Код: Выделить всё
PreparedStatement ptmt =
connection.prepareStatement("select * from foo where id in (?)");
String[] values = new String[3];
values[0] = "a";
values[1] = "b";
values[2] = "c";
ptmt.setArray(1, connection.createArrayOf("text", values));
Код: Выделить всё
select * from foo where id in ('{"a","b","c"}')
Код: Выделить всё
select * from foo where id in ("a","b","c")
Код: Выделить всё
select * from foo where id in ('a','b','c')
Подробнее здесь: https://stackoverflow.com/questions/166 ... d-setarray
Мобильная версия