May 2020
Beginner
564 pages
14h 9m
English
To ensure that all values in a column are not null, you use a not null constraint. This type of key can be applied to any data type and is used to avoid missing data. If you create a not null constraint on a column, it will force the table to have values in that specific column. If the values are null, then the row will not be inserted or updated.
In the following screenshot, you can see that the birthYear constraint is set to not null. The deathYear constraint would allow nulls since not all people have a year of death:

Read now
Unlock full access