Reputation: 587
Well, my question concisely is "When I wrote the ? in place of the table name it gave no action " like here, suppose I have..
String full = "update ? set name = ? where id = ?";
but when I remove the first ? and type the table name "Everything goes perfect" ... Any suggestions ?
Upvotes: 0
Views: 61
Reputation: 178333
In JDBC, the ?
placeholder stands for a value, and it cannot stand for an identifier such as a table name. It can be used where a literal value can be used. You'll notice you can't have the ?
where a column name is expected either.
Upvotes: 5