欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Oracle Database 12c SQL面试题:constraints约束

程序员文章站 2022-03-26 17:47:35
q6.which two statements are true regarding constraints (choose two) a. a constraint is enforced onl...

q6.which two statements are true regarding constraints (choose two)

a. a constraint is enforced only for an insert operation on a table.

b. a foreign key cannot contain null values.

c. the column with a unique constraint can store nulls.

d. you can have more than one column in a table as part of a primary key.

correct answer: cd

对于 a 选项,foreign key 可以包含 null

对于 c 选项,constaint 在 delete,update 的时候也会应用。

对于 e 选项,not null 不能在表级别定义,只能在列级别定义。