Multiple choice technology programming languages

Which SQL keyword is used to retrieve only unique values?

  1. UNIQUE

  2. DISTINCTIVE

  3. DIFFERENT

  4. DISTINCT

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

DISTINCT is the SQL keyword used in SELECT statements to return only unique (different) values, eliminating duplicates. UNIQUE is a constraint for creating indexes, not a query keyword.

AI explanation

The DISTINCT keyword tells SQL to remove duplicate rows from the result set, returning only unique values. UNIQUE, DISTINCTIVE, and DIFFERENT are not valid SQL keywords for this purpose, even though they sound plausible in plain English.