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!

Prepared Statement with SQL 'IN' Clause

843859Oct 17 2007 — edited Oct 20 2007
Hi,

I am trying to write a JDBC SQL call to a database using a prepared statement, the call looks something like:

select *
from table
where field in (?, ? ,?)

this thing is that i don't know how many 'IN' parameters are needed until runtime (they come from a List), so is there an easy way of dealing with this, I haven't been able to find any information on this problem anywhere?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2007
Added on Oct 17 2007
16 comments
4,728 views