DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2000

    Question 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



  2. #2
    Join Date
    Nov 2002
    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

Click Here to Expand Forum to Full Width

By using this site, you agree to the Privacy Policy