Using Constraints
Constraints—including PRIMARY KEY
, FOREIGN KEY
, UNIQUE
, CHECK
, and DEFAULT
—are the primary method used to enforce data integrity. You can implement defaults as constraints or as objects in a database; for more information, see the “Defaults” section, later in this chapter.
Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.