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

后端 未结 11 1216
不思量自难忘°
不思量自难忘° 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 17:47

    Primary key -> Any column or set of columns that can uniquely identify a record in the table is a primary key. (There can be only one Primary key in the table) and the candidate key-> the same as Primary key but the Primary Key chosen by DB administrator's prospective for example(the primary key the least candidate key in size)

提交回复
热议问题