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
  • 833
  • 1
  • 10
  • 32

1 Answers1

2

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

Joop Eggen
  • 107,315
  • 7
  • 83
  • 138