Working with Domains |
|
A domain is a type of integrity constraint you can use when defining a column. Domains specify the data type of the column, and may also specify a default value and a value constraint. When you define a column using a domain, the column inherits the properties of the domain (data type, default value, and value constraint) without requiring you to explicitly specify them. Specifying the default value and value constraint using domains achieves the same results as specifying them in a standard column definition. If you specify a default value for a column, it will override the default value specified in a domain. If you specify any value constraints in the column definition, they will be used in addition to the value constraints specified in the domain. If you do define a column using a domain and specify additional value constraints, you should ensure the additional value constraints do not conflict with those defined in the domain.
Related topic: