On Fri, 11 Sep 2015 02:02:05 +0100 Simon Slavin <slavins at bigfraud.org> wrote:
> Looking at > > <https://www.sqlite.org/syntax/column-constraint.html> > > maybe the 'constraints' that the documentation refers to are the ones > specifically declared using CHECK in the table definition. Perhaps > NOT NULL and UNIQUE don't count. That's the conventional understanding. SQL didn't always have CHECK, as you know, but it had NULL from the very start. I cannot think of a product that ever permitted missing values in a column marked NOT NULL; there was no SET NULL OK or whatever. Constraint checking -- including referential integrity contraints -- used to be done with triggers. In those days, you dropped enforcement by dropping (or changing) the trigger. With the arrival of Declarative Referential Integrity, that wasn't an option because enforcement was part of the table definition, not procedural code. Hence the need to enable it selectively with system settings. --jkl