Specifying NOT NULL
You can optionally specify
NOT NULL to force the user to enter a value. If you do not specify
NOT NULL, then
NULL values are allowed for any column that references this domain.
NOT NULL specified on the domain level cannot be overridden by a local column definition.
- Important: If you have already specified
NULLas a default value, be sure not to create contradictory constraints by also assigning
NOT NULLto the domain, as in the following example:
CREATE DOMAIN DOM1 INTEGER DEFAULT NULL, NOT NULL;