Junior SQL

What is a surrogate key?

How is it different from a natural key?

A surrogate key is an artificial, system-generated key used to uniquely identify a record in a

table. It has no business meaning and is typically a number (e.g., auto-incremented ID).

  • Surrogate Key:
  • No business meaning.
  • Commonly used in data warehousing and large-scale systems.
  • Example: A column UserID that is generated automatically.
  • Natural Key: A key that has real-world business meaning and is used to uniquely

identify records.

  • Example: SocialSecurityNumber or EmailAddress could serve as

natural keys.

More from SQL Server Tutorial

All questions for this course