Home > OS >  NULL vs NOT NULL (SQLite)
NULL vs NOT NULL (SQLite)

Time:07-06

Is NULL in FooColumn2 TEXT NULL an explicit way to say nullable? Or does it mean something different?

CREATE TABLE IF NOT EXISTS FooTable (FooColumn1 TEXT NOT NULL, FooColumn2 TEXT NULL)

CodePudding user response:

Normally, by default it’s nullable if not explicitly stated as NOT NULL; does not look like NULL is part of the column constraint at all:

https://www.sqlite.org/lang_createtable.html source: https://www.sqlite.org/lang_createtable.html

  • Related