What is the best approach using JDBC for parameterizing an IN clause? [duplicate]
问题 This question already has an answer here: PreparedStatement IN clause alternatives? 28 answers Say that I have a query of the form SELECT * FROM MYTABLE WHERE MYCOL in (?) And I want to parameterize the arguments to in. Is there a straightforward way to do this in Java with JDBC, in a way that could work on multiple databases without modifying the SQL itself? The closest question I\'ve found had to do with C#, I\'m wondering if there is something different for Java/JDBC. 回答1: There's indeed