In some cases you need to write something like this:
SELECT my_column FROM my_table where search_column IN (?)
Unfortunately this feature is not supported by JDBC, hence we have workarounds like these: Preparedstatement IN clause alternatives/StackOverflow
IN Clause Workaround
The workaround is pretty simple, if you want to execute this:
Then you join this list with single quotes and commas:
You can use this approach with relatively small lists, as the bigger the list, the longer the generated query. Every database has a limit on size of a query, so your mileage may vary.
How to comment
The comment section below is to discuss documentation on this page.
If you have an issue, or discover bug, please follow instructions on the Support page