What is the difference between a candidate key and a primary key?

后端 未结 11 1215
不思量自难忘°
不思量自难忘° 2020-12-23 17:24

Is it that a primary key is the selected candidate key chosen for a given table?

11条回答
  •  鱼传尺愫
    2020-12-23 18:09

    A table can have so many column which can uniquely identify a row. This columns are referred as candidate keys, but primary key should be one of them because one primary key is enough for a table. So selection of primary key is important among so many candidate key. Thats the main difference.

提交回复
热议问题