SQLite Forum

Table constraints accepted without comma

According to https://www.sqlite.org/lang_createtable.html "table-constraint" items go after "column-def" items and must be separated with comma, but:

create table test (
id int,
check (id > 1)
check (id < 10))

There is no comma between these check constraints, but this statement does not fail and moreover - second "check" works, 

insert into test values (11)

fails with error "CHECK constraint failed: id < 10".

This seems to be a BUG, to my understanding the expected result should be failure of such CREATE TABLE.

Tested wtih recent official System.Data.SQLite .net library (sqlite_version() returns 3.37.0) and with SQLiteStudio 3.3.3 (sqlite_version() returns 3.35.4)