On 6/27/18, Igor Tandetnik <[email protected]> wrote:
> On 6/27/2018 9:14 PM, Richard Hipp wrote:
>> On 6/27/18, Mark Wagner <[email protected]> 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
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users