PreparedStatement IN clause alternatives?

前端 未结 30 3896
情歌与酒
情歌与酒 2020-11-21 05:19

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

30条回答
  •  盖世英雄少女心
    2020-11-21 05:54

    I've never tried it, but would .setArray() do what you're looking for?

    Update: Evidently not. setArray only seems to work with a java.sql.Array that comes from an ARRAY column that you've retrieved from a previous query, or a subquery with an ARRAY column.

提交回复
热议问题