SQLite Forum

CHECK violation during table definition ignored, normal or bug?
Login
All CHECK constraints are table constrains.  It is just *happenstance* that their is syntactic sugar allowing you to pretend they are part of the column definition when they are not:

```
sqlite> create table t
   ...> (
   ...> a integer,
   ...> b integer check (c > 4),
   ...> c integer check (b < 2)
   ...> );
```

This is the same as the "ON expr" clause being mere syntactic sugar for the clause WHERE/AND (expr) except in the specific case of an outer join.