29. 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.
Answer: BD
A:外键约束不能包括空值(错误,仅仅有非空约束和主键约束不能包括空值)。
B:唯一约束的字段能够存储空值(正确,由于NULL<>NULL)
C:一个表上的约束仅仅对插入操作起作用(错误,Update、delete相同起作用)。
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.
Answer: BD
A:外键约束不能包括空值(错误,仅仅有非空约束和主键约束不能包括空值)。
B:唯一约束的字段能够存储空值(正确,由于NULL<>NULL)
C:一个表上的约束仅仅对插入操作起作用(错误,Update、delete相同起作用)。
D:能够在一个表中定义超过一个字段作为主键(正确,能够同一时候定义多个字段共同作为主键,如CONSTRAINT it_pk PRIMARY KEY (ord_no,item_no))