AI engineering glossary · SQL databases
What is NOT NULL?
NOT NULL: A constraint that forbids a column from holding NULL, so every row must supply a real value. It is used for fields that always must exist, and it makes queries simpler because missing values cannot appear there.
NOT NULL: an example
email VARCHAR(255) NOT NULL means inserting a user without an email raises an error.
Related terms
More SQL databases terms
- NULL
- Object-relational mapper
- One-to-many relationship
- ORDER BY
- Parameterised query
- PARTITION BY
- Phantom read
- PostgreSQL
Where you learn it
NOT NULL is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.