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!

Collection of values as Parameter of preparedStatement

843854Mar 16 2004 — edited Mar 16 2004
I would like to know if it is possible (and how) to pass a collection of values to prepare statement.
I'm interested in sentence like: "SELECT .... WHERE ... <column> IN (?)"
Then the parameter should be set to the statement when it contains more than a single value, for example the parameter will be 1,2,3,4,5,6,7 so I want that at execution time the value will be understood as:
"SELECT ... WHERE ... <column> IN (1,2,3,4,5,6,7)"

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2004
Added on Mar 16 2004
14 comments
1,338 views