Defaults and rules

Transact-SQL provides keywords for maintaining entity integrity to ensure a value is supplied for every column that requires one, and domain integrity to ensure each value in a column belongs to the set of legal values for that column. Defaults and rules define integrity constraints that are used 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 14, “Defining Defaults and Rules for Data.”