Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

NULL vs NOT NULL (SQLite)

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)

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading