Which type of key can contain NULL values in a relational database?

Options

  • A. Primary Key
  • B. Foreign Key
  • C. Both Primary Key and Foreign Key
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Foreign Key

Detailed Explanation

Explanation: A Foreign Key may contain NULL values when the relationship is optional. A Primary Key cannot contain NULL values.