O'Reilly logo

Microsoft® SQL Server® 2008 Step by Step by Mike Hotek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Constraints

Constraints are used within SQL Server to define structural elements that bound the data and enforce consistency. The constraints that are available in SQL Server are: primary key, unique, check, default, and foreign key.

Primary Keys

The primary key is a fundamental constraint in properly designing a database. A primary key defines the column or columns that uniquely identify each row within the table. While you can add data to a table (INSERT) without a primary key, it is impossible to modify or delete a single row of data unless it can be uniquely defined.

Note

Note

While there are a very small number of specific exceptions, every table in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required