Primary key vs unique

  • Thread starter Alexander Vasilevsky
  • Start date
T

Teemu Keiski

Primary key is always unique while unique key isn't necessarily always a
primary key (although it quite often is). One difference is the NOT NULL
constraint (not enforced for UK while it is enforced for PKs) and that table
can have only one primary key but many unique keys.

http://en.wikipedia.org/wiki/Primary_key says it well
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top