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

來源:互聯網
上載者:User

28. Which two statements are true regarding constraints? (Choose two.) 
A. A foreign key cannot contain NULL values. 
B. A column with the UNIQUE constraint can contain NULL values. 
C. A constraint is enforced only for the INSERT operation on a table. 
D. A constraint can be disabled even if the constraint column contains data. 
E. All constraints can be defined at the column level as well as the table level. 


Answer: BD 


A:外鍵約束不能包含空值(錯誤,只有非空約束和主鍵約束不能包含空值)。
B:唯一約束可以包含空值(正確,因為NULL<>NULL)
C:一個表上的約束只對插入操作起作用(錯誤,Update、delete同樣起作用)。
D:即使欄位上有資料,該欄位上的約束也可以被停用(正確)
E:所有的約束都可以定義在列層級和表層級(錯誤,Not Null只能定義在列層級)。

相關文章

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.