SQL NOT NULL Constraint
By default, columns of a table accept NULL values.
SQL NOT NULL constraint
NOT NULL constraints force columns to not accept NULL values.
NOT NULL constraints force fields to always contain values. This means that you cannot insert new records or update records without adding values to the fields.
The following SQL forces the "ID" column, "LastName" column, and "FirstName" column to not accept NULL values:
Add NOT NULL constraint
Add a NOT NULL constraint to the "Age" field of an already created table as follows:
Delete NOT NULL constraint
Removing the NOT NULL constraint in the "Age" field of an already created table looks like this: