A DBA is defining a customer table: CREATE TABLE customer (customer_id INT PRIMARY KEY, email ...); Every customer must have an email address, and no two customers may share one. Which column definition enforces both rules in the table itself?
Select an answer to reveal the explanation.
Short Explanation
You've got two rules, so you need two locks on the door: NOT NULL makes sure the value's always there, and UNIQUE makes sure nobody else has it. Watch the near misses; each wrong answer gets one rule right and quietly forgets the other.
Full Explanation
Constraints declared in the table definition enforce data rules in the database itself, regardless of which application or user writes the data. NOT NULL prevents rows from being inserted or updated without a value in the column, and UNIQUE prevents two rows from holding the same non-null value. Declaring both on the email column guarantees that every customer has an email address and that no address is shared. A definition with only UNIQUE prevents duplicates but still permits NULL; under standard SQL, nulls are not considered equal for uniqueness, so many customers could have no email at all. A definition with NOT NULL and a default of an empty string guarantees a value is present, but the empty-string default can be used repeatedly and there is no uniqueness rule, so duplicate addresses and placeholder values are allowed. A CHECK that the email is not an empty string rejects empty strings but does not reject NULL, because a CHECK that evaluates to unknown is treated as satisfied, and it does nothing to prevent duplicates. Exam caveat: some engines treat multiple NULLs in a unique column differently, which is one more reason to declare NOT NULL explicitly when a value is required. Operational check: insert test rows with a missing email, an empty-string email and a duplicate email in non-production, confirm the expected rejections, and document both constraints in the data dictionary.