Surrogate Key In SQL Server 2008
In this article we will learn about Surrogate Key in SQL Server.
In this article we will learn about Surrogate Key in SQL Server while designing database.
While designing database, mostly we have a primary key for each table. Surrogate keys are numeric keys that are substitution for the natural primary key. These are unique number or unique identifier for each row that can be used as primary key. Surrogate key is also known as Artificial key or Identity key.
Features of Surrogate Key
- Surrogate keys are numeric.
- Surrogate keys are generated internally that have no "business" meaning and whose sole purpose is to identify a record in the table
- It is useful because the natural primary key can change and this makes updates more difficult.
- It just combine data from tables with incompatible keys.
- Surrogate keys can be created in number of ways like using IDENTITY property or using UniqueIdentifier.