Triggers  Error handling and set options

Chapter 1: SQL Building Blocks

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 13, “Defining Defaults and Rules for Data.”





Copyright © 2005. Sybase Inc. All rights reserved. Error handling and set options

View this book as PDF