engineering computer science MCQ #720

What is the purpose of the UNIQUE constraint in a database table?

engineering computer science MCQ #720

  1. Question 1

    Q1. What is the purpose of the UNIQUE constraint in a database table?

    • A) To ensure that each value is unique
    • B) To enforce data consistency
    • C) To improve query performance
    • D) To store data

    Answer: To ensure that each value is unique

    Explanation: The UNIQUE constraint ensures that each value in a column or set of columns is unique, preventing duplicate values from being inserted.