What is the difference between Primary key and Candidate key?

We use Primary key to uniquely identify a row in a table. There is only one Primary key in a table.

There can be other keys in a table that uniquely identify a row. But they all may not be labelled as a Primary key.

All the keys that are candidate for a primary key are called Candidate key.

Read the full book at www.amazon.com
Posted in MySQL, MySQL Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*