OCP-1Z0-051 第29题 约束

来源:互联网 发布:程序员修炼之道pdf 编辑:程序博客网 时间:2024/06/10 22:43
一、原题
Which two statements are true regarding constraints? (Choose two.)
A. A foreign key cannot contain NULL values.
B. The column with a UNIQUE constraint can store NULLS .
C. A constraint is enforced only for an INSERT operation on a table.
D. You can have more than one column in a table as part of a primary key.

答案:BD
二、题目翻译
关于约束哪两个句子是正确的?(选择两个)
A. 外键不能包含空值。
B. 唯一约束的列可以包含空值。
C. 约束只能作用在INSERT操作上。
D. 表的主键可以包含多个列。

三、题目解析
A选项不正确,因为外键可以包含空值。
C选项不正确,因为约束可以作用在INSERT,UPDATE,DELETE操作上。

0 0
原创粉丝点击