While creating a table, which constraint does not allow insertion of duplicate…

2025

While creating a table, which constraint does not allow insertion of duplicate values in the table?

  1. A.

    UNIQUE

  2. B.

    DISTINCT

  3. C.

    NOT NULL

  4. D.

    HAVING

Attempted by 2066 students.

Show answer & explanation

Correct answer: A

To determine which constraint prevents duplicate values during table creation, let's analyze each option: Option A: UNIQUE / यूनिक Step 1: UNIQUE is a constraint that enforces uniqueness in a column or set of columns. Step 2: It ensures that no two rows can have the same value in the specified column(s). Step 3: Therefore, it prevents the insertion of duplicate values. Option B: DISTINCT / डिस्टिंक्ट Step 1: DISTINCT is a keyword used in SELECT statements to return only unique rows. Step 2: It is not a constraint that can be applied during table creation. Step 3: Therefore, it does not prevent duplicates at the table level. Option C: NOT NULL / नॉट नल Step 1: NOT NULL ensures that a column cannot contain NULL values. Step 2: It does not restrict duplicate values; multiple rows can have the same non-null value. Step 3: Therefore, it allows duplicate entries. Option D: HAVING / हैविंग Step 1: HAVING is used in SQL to filter groups after a GROUP BY clause. Step 2: It is not a constraint applied during table creation. Step 3: Therefore, it does not control duplicate values in the table.

Explore the full course: Bpsc