Olá a todos,
Tenho dois códigos, muito semelhantes, mas apenas um funciona.
Gostaria de saber se alguem pode me dizer onde estou errando ae:
code // PreparedStatement stmt = null;
this.stmt = this.conn.prepareStatement(“show create table ?”);
this.stmt.setString(1,table);
this.rs = this.stmt.executeQuery();
rs.next();
System.out.println(rs.getString(1)+" :: "+rs.getString(2));
(…)[/code]
E esse aqui funciona (mas não queria concatenar o nome da tabela direto na query):
code // Statement stmt = null;
this.stmt = this.conn.createStatement();
this.rs = this.stmt.executeQuery("show create table "+table);
rs.next();
System.out.println(rs.getString(1)+" :: "+rs.getString(2));
(…)[/code]