Which SQL keyword is used to retrieve only unique values?

2024

Which SQL keyword is used to retrieve only unique values?

Answer: C. DISTINCTAnswer: Option C Solution: This command is used to select the distinct rows. For Example: If we want to select all distinct department names from employee…

  1. A.

    DISTINCTIVE

  2. B.

    UNIQUE

  3. C.

    DISTINCT

  4. D.

    DIFFERENT

Attempted by 2130 students.

Show answer & explanation

Correct answer: C

Answer: Option C

Solution:

This command is used to select the distinct rows.

For Example: If we want to select all distinct department names from employee table, the query would be:

SELECT DISTINCT dept FROM employee;

Explore the full course: Lti Mindtree Preparation

Loading lesson…