0

Here is my PostgreSQL raw query which is working fine.

    select * from employee where to_json(array( select jsonb_array_elements(employeeids) ->> 'id'))::
jsonb?|array['22', '17', '23', '24'] AND empname =?;

but when I run the java code it's excepting me to give two values, but the first? is part of the query, for which I need not supply any value.

prasad kp
  • 725
  • 1
  • 8
  • 30

1 Answers1

2

Escaping the first question mark by two question marks ??.

Joop Eggen
  • 102,262
  • 7
  • 78
  • 129