Great explanation. Thanks. On Wed, Jun 27, 2018 at 7:43 PM Richard Hipp <d...@sqlite.org> wrote:
> On 6/27/18, Igor Tandetnik <i...@tandetnik.org> wrote: > > On 6/27/2018 9:14 PM, Richard Hipp wrote: > >> On 6/27/18, Mark Wagner <m...@google.com> wrote: > >>> Thanks for all the good background. FWIW this came up because someone > >>> had > >>> created a row with something like: (column_name non null). Needless > to > >>> say, this created a column without a "not null" constraint. > >> > >> It should have. I get an error when I type: > > > > Note the typo: "non null" where "not null" was meant. This creates a > column > > with type "non". I'm not sure why "null" is accepted though - no path > > through syntax diagram seems to allow it at that spot. Perhaps there's an > > undocumented column constraint "NULL", to complement "NOT NULL"? > > "NULL" without the "NOT" is a valid constraint. So the datatype is > "NON" and it has a "NULL" constraint, meaning is able to hold NULL > (the default). > > This works on PosgreSQL, MySQL, and Oracle, for example: > > CREATE TABLE t1(x INT NULL); > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users