CS FundamentalsModerateGATE CS · PSU (ISRO/BARC)

Which statement about a FOREIGN KEY constraint in standard SQL is correct?

  1. A. It must reference the primary key only
  2. B. It may reference any UNIQUE (candidate key) column set, and its own columns may be NULL
  3. C. Its columns must also be the primary key of the referencing table
  4. D. Its columns can never be NULL

Correct answer: B. It may reference any UNIQUE (candidate key) column set, and its own columns may be NULL

A foreign key must point at a key of the referenced table (primary or UNIQUE). A NULL foreign key value is allowed and simply means 'no reference'.

More DBMS and SQL questions

Exams that ask this topic