Primary key is a combination of which of the following constraints?
(A) Unique
(B) Distinct
(C) Not Null
(D) Default
Primary key is a combination of which of the following constraints?
(A) Unique
(B) Distinct
(C) Not Null
(D) Default
Solution
A primary key uniquely identifies each row and cannot be empty. So it combines the UNIQUE constraint (no duplicate values) with the NOT NULL constraint (no missing values).
Option 2: DISTINCT is a keyword used in SELECT queries to remove duplicate rows from results, not a constraint.
Options 3 and 4: DEFAULT only supplies a value when none is given, so it plays no part in a primary key.
A table can have only one primary key, but it can have several UNIQUE columns, and UNIQUE alone allows NULL values.
Related questions:
2025: 13 May Shift 2
2025: 20 May Shift 1
2025: 3 June Shift 2
2026: 23 May Shift 2