1

Hi this sql statement excutes as expected

select * from table where id in(1,2,3);

But there is posibility of IN() clause to be empty like below

    select * from table where id in();

Apache Derby complains with syntax error : encountered ")" at line n

Mysql knows how to deal with such a situation and will return no value, How do i make apache derby act the same as mysql when it comes to such empty list?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
katwekibs
  • 1,342
  • 14
  • 17
  • `IN ()` is invalid SQL and will be rejected by any self-respecting database. MySQL is known to not really care about proper SQL syntax. You should fix your code to generate valid SQL statements. –  Jun 26 '19 at 08:56

0 Answers0