How to set value for in clause in a preparedStatement in JDBC while executing a query.
connection.prepareStatement("Select * from test where field in (?)");
If this in-clause can hold multiple values how can I do it. Sometimes I know the list of parameters beforehand or sometimes I don't know beforehand. How to handle this case?