Oracle Database 11g: SQL Fundamentals I — Question 4
Which two statements are true regarding constraints? (Choose two.)
Answer options
- A. A constraint can be disabled even if the constraint column contains data
- B. A constraint is enforced only for the INSERT operation on a table
- C. A foreign key cannot contain NULL values
- D. All constraints can be defined at the column level as well as the table level
- E. A column with the UNIQUE constraint can contain NULL values
Correct answer: A, E
Explanation
Option A is correct because constraints can be disabled regardless of existing data. Option E is also correct since columns with a UNIQUE constraint can indeed hold NULL values. Options B and C are incorrect as constraints apply to other operations beyond INSERT and foreign keys can contain NULL values. Option D is misleading because while some constraints can be defined at both levels, not all types can.