engineering computer science MCQ #879

What is the difference between a primary key and a unique key?

engineering computer science MCQ #879

  1. Question 1

    Q1. What is the difference between a primary key and a unique key?

    • A) A primary key can be null, while a unique key cannot be null
    • B) A primary key is used for indexing, while a unique key is not
    • C) A primary key uniquely identifies a record, while a unique key ensures uniqueness but can be null
    • D) A primary key is used for data encryption, while a unique key is not

    Answer: A primary key uniquely identifies a record, while a unique key ensures uniqueness but can be null

    Explanation: A primary key uniquely identifies a record and cannot be null, while a unique key ensures uniqueness but can be null.