Multiple choice technology mainframe

What does distinct keyword do?

  1. Removes duplicate rows from your result.

  2. Selects all the rows.

  3. Puts the rows in descending order.

  4. None of the above

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

DISTINCT removes duplicate rows from result sets, returning only unique rows. It does not select all rows, affect ordering, or perform filtering - it purely eliminates duplicates based on selected columns.

AI explanation

The SQL DISTINCT keyword eliminates duplicate rows from a query's result set, returning only unique combinations of the selected columns. It does not select all rows (that's the default behavior without DISTINCT), and it has nothing to do with ordering (that's ORDER BY ... DESC for descending order). So 'Removes duplicate rows from your result' is the correct, standard definition of DISTINCT.