Question:medium

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

Show Hint

Use UNIQUE for preventing duplicates,
PRIMARY KEY combines UNIQUE and NOT NULL.
Updated On: Jan 14, 2026
  • UNIQUE
  • DISTINCT
  • NOT NULL
  • HAVING
Show Solution

The Correct Option is A

Solution and Explanation

Database constraints are rules applied to columns to maintain data integrity.
The UNIQUE constraint mandates that all entries in a column must be distinct, thereby preventing duplicate insertions.
An example is setting an email column as UNIQUE to guarantee each record has a unique email address.
In contrast, the DISTINCT keyword filters duplicate rows from query results but is not a data integrity constraint.
NOT NULL prevents null values but permits duplicates.
HAVING filters grouped data and does not enforce integrity during data insertion.
Consequently, UNIQUE is the sole option that prevents duplicate values at the table level.
Thus, option (A) is correct.
Was this answer helpful?
0