OCP-1Z0-051-題目解析-第29題

來源:互聯網
上載者:User

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同樣起作用)。
D:可以在一個表中定義超過一個欄位作為主鍵(正確,可以同時定義多個欄位共同作為主鍵,如CONSTRAINT it_pk PRIMARY KEY (ord_no,item_no))

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.