Tuesday, March 31, 2009

Primary Key

A primary key is a special candidate key. It is and attribute or minimal set of attributes that not only uniquely identifies a specific occurrence of the entity, but also exists for every occurrence of an entry. The difference between a primary key and any other unique key is that SQL Server automatically uses the primary key definition in various Referential integrity constructs.

In other words, the primary key is a field (or a set of fields) that uniquely identifies each record of a tale. A table have only one key declared as primary. If a primary key consists of more then one column, duplicate values are allowed in one of the columns, but the combination of values from all the columns in the primary key must be unique.

No comments: