Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pass table name as parameter in prepared Statement

843859Jan 9 2008 — edited Jan 9 2008
Can I pass table name as parameter in prepared Statement
for example
select * from ? where name =?

when i use setString method for passing parameters this method append single colon before and after of this parameter but table name should be send with out colon as SQL Spec.
I have another way to make sql query in programing but i have a case where i have limitation of that thing so please tell me is it possible with prepared Statment SetXXx methods or not ?

Thanks
Haroon Idrees.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2008
Added on Jan 9 2008
4 comments
2,431 views