SQL Database Design » 10. Constraints » 10.5 Not-Null Constraints

10.5 Not-Null Constraints

The NOT NULL constraint disallows NULL values NOT NULL can only be specified inline, that is, directly following the column definition. Not-null constraints implement the obligation property, which is true for regular and foreign key columns.

The only issue that I came up with not-null constraints is whether to put a not-null constraint onto columns that are already primary keys. Short answer: do it. You might change the primary key someday on a very busy day and this will keep the column to its not-null constraint.

References for Constraints:

Last updated: 2010-08-04