O'Reilly logo

SQL: Visual QuickStart Guide by Chris Fehily

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

Primary Keys

Every value in a database must be accessible. As values are stored at row–column intersections in tables, it’s clear that a value’s location refers to a specific table, column, and row. You can identify a table or column by its unique name. Rows are unnamed, however, and require a different identification mechanism called a primary key. A primary key is:

  • Required. Every table has exactly one primary key. Remember that the relational model views a table as an unordered set of rows. Because there’s no concept of a “next” or “previous” row, you can’t identify rows by position; without a primary key, some data would be inaccessible.

  • Unique. Because a primary key identifies a single row in a table, no two rows in a table can have the ...

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