Specifying NOT NULL
Go Up to Creating Domains (Data Definition Guide)
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
NULL
as a default value, be sure not to create contradictory constraints by also assigningNOT NULL
to the domain, as in the following example:
CREATE DOMAIN DOM1 INTEGER DEFAULT NULL, NOT NULL;