-
PreparedStatement and IN clause
Hello All ,
I have to write a SQL for a PreparedStatement which has the IN keyword in the where clause.The number of parameters which go into IN is decided dynamically.
i can find out the number of parameters at runtime.Can i insert those specific number of ? in the SQL, prepare the SQL , set the values , and then execute the PreparedStatement ?
i am using Oracle 9i and jdbc 2.0
thanks,
Srinivas
-
of course you can.
you lose a little of the advantages (statement caching) of the prepared statement, but gain on not needing to worry about escape codes, number format etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|