What will be the output of the following query if the table dept has duplicate…

UP Police Computer Operator Grade A 2023

What will be the output of the following query if the table dept has duplicate department names?


SELECT DISTINCT dept_name
FROM dept
ORDER BY dept_name DESC NULLS FIRST;

  1. A.

    All department names with duplicates removed, but order is random

  2. B.

    All unique department names sorted descending, NULLS first

  3. C.

    Same as GROUP BY dept_name

  4. D.

    All department names sorted ascending, NULLS at bottom

Attempted by 638 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…