How do I… Enforce domain integrity for SQL Server data using CHECK constraints?
(Susan Hawkins) You might think that simple data errors aren’t terribly important, but even a small error can do a lot of damage. For instance, an incorrect ZIP code doesn’t seem too serious–until a new customer’s order doesn’t show up. Or imagine your best salesperson’s surprise when a commission check is half the expected amount. There are no shortcuts–invalid data can wreak havoc. By restricting the data that any domain, or column, can accept, developers help ensure that the data the application stores is appropriate. Enforcing domain integrity simply means that a column accepts only valid values, as dictated by the application’s business rules.