【发布时间】:2011-12-28 10:59:51
【问题描述】:
我有一个非常简单的 SQL“更新表,其中 ID 在 (1,2,3)”
当我在做的时候
String sql = "update table where ID in (?)";
List<Integer> ids = new ArrayList();
ids.add(1);
ids.add(2);
ids.add(3);
jdbc.update(sql, new Object[] { ids });
我在输出中收到错误的 sql
update table where ID in ('1,2,3')
我怎样才能去掉这个额外的报价?
【问题讨论】: