What would be the simplest way to covert a Set<String> to an argument for Oracle in (?)? I am already using PreparedStatement for that.
What would be the simplest way to covert a Set<String> to an argument for
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t. The query must have one placeholder (
?) for each of the elements in the set. And you have to bind every element of the set:If your set has three elements, your prepared statement must look like this :
and you must iterate through the set and bind each element individually: