0

I made sql query for mariadb 10.1

but, I upgrade mariadb 10.1 to 10.3, but it occurs ER_PARSE_ERROR and SQL syntax error.

This error is:

code: 'ER_PARSE_ERROR',
errno: 1064,
sqlMessage:
 'You have an error in your SQL syntax; check the manual that 
  corresponds to your MariaDB server version for the right syntax to 
  use near \')\' at line 1',
sqlState: '42000',
index: 0,
sql: 'select * from user where identifier in ()' }

What's wrong is it?

I keep looking, but I do not know what's wrong.

ko_ma
  • 911
  • 2
  • 11
  • 26

1 Answers1

1

It doesn't seem to like the empty list. Try to change the query.

select * from user where identifier in (null)

Null won't match any value (even another null) so this is effectively, what you seem to want.

sticky bit
  • 36,626
  • 12
  • 31
  • 42