|
Transact-SQL User's Guide
|
Defaults and rules
Transact-SQL provides keywords for maintaining entity integrity (ensuring
that a value is supplied for every column requiring one) and domain
integrity (ensuring that each value in a column belongs to the set of
legal values for that column). Defaults and rules define integrity constraints
that come into play during data entry and modification.
A default is a value linked to a particular column or datatype,
and inserted by the system if no value is provided during data entry.
Rules are user-defined integrity constraints linked to a particular
column or datatype, and enforced at data entry time. Rules and defaults
are discussed in Chapter 12, "Defining Defaults and Rules
for Data."