Which clause is used to eliminate repetition and display values only once in the SELECT statement?
Which clause is used to eliminate repetition and display values only once in the SELECT statement?
Solution
✅ Correct Option: 3
DISTINCT removes duplicate rows from the result of a SELECT statement, so each value is displayed only once. For example, SELECT DISTINCT city FROM students; lists every city a single time, even if many students live there.
UNIQUE: a constraint used when creating a table to stop duplicate values being stored. It does not filter the output of a SELECT.
WHERE: filters rows by a condition. It does not remove repeated values.
NULL: represents a missing or unknown value. It is not a clause.
Related questions:
2025: 20 May Shift 1
2026: 31 May Shift 1