What are the best workarounds for using a SQL IN
clause with instances of java.sql.PreparedStatement
, which is not supported for multiple values du
I suppose you could (using basic string manipulation) generate the query string in the PreparedStatement
to have a number of ?
's matching the number of items in your list.
Of course if you're doing that you're just a step away from generating a giant chained OR
in your query, but without having the right number of ?
in the query string, I don't see how else you can work around this.