SQLite Forum

"expr" syntax diagram differs from behaviour
Login
The syntax diagram for expressions at
<https://www.sqlite.org/lang_expr.html>
shows that if IN is followed by a list of expressions (rather than any of the other options allowed) the list must be nonempty: it could just as easily have allowed an empty list as for a function argument list.

In fact the actual behaviour of sqlite 3.28.0 is to accept an empty list, and the value of expression IN () is zero, since whatever the expression is, it isn't in the list.

It isn't a major problem, but either the syntax diagram or the code is wrong.