考试报名
考试报名
考试内容
考试大纲
在线客服
返回顶部

备考刷题,请到

CDA认证小程序

Primary key is an important concept in table data. Which of the following statements about it is incorrect?
A. A table can only have one primary key
B. Primary key cannot have null values
C. Primary key can only be one field
D. Primary key cannot have duplicate values
上一题
下一题
收藏
点赞
评论
题目解析
题目评论(0)

A primary key consisting of multiple fields is called a compound primary key.

正确答案是C: Primary key can only be one field。

专业分析:
1. **A: A table can only have one primary key**
这条陈述是正确的。一个表只能有一个主键,但这个主键可以由多个字段组成,这就是所谓的复合主键。

2. **B: Primary key cannot have null values**
这条陈述也是正确的。主键的一个基本特性就是它不允许有空值(NULL),因为主键用于唯一标识表中的每一行数据。

3. **C: Primary key can only be one field**
这条陈述是不正确的。虽然一个表只能有一个主键,但这个主键可以由多个字段组成,即复合主键。因此,主键不一定只能是一个字段。

4. **D: Primary key cannot have duplicate values**
这条陈述是正确的。主键的另一个基本特性就是它必须唯一,不能有重复的值。每一个主键值都唯一地标识表中的一行数据。

综上所述,C选项关于主键只能是一个字段的说法是不正确的,因此C是正确答案。