In SQL, which command is used to SELECT only one copy of each set of…

2025

In SQL, which command is used to SELECT only one copy of each set of duplicable rows

  1. A.

    SELECT DISTINCT

  2. B.

    SELECT UNIQUE

  3. C.

    SELECT DIFFERENT

  4. D.

    All of the above

Attempted by 1273 students.

Show answer & explanation

Correct answer: A

Answer: Option A

Solution:

The SELECT keyword allows us to grab all information from a column (or columns) on a table. This, of course, necessarily means that there will be redundancies. What if we only want to select each distinct element? This is easy way to accomplish in SQL. All we need to do is that to add DISTINCT after SELECT. The syntax is as follows:

SELECT DISTINCT column_name

FROM table_name;

Explore the full course: Accenture Preparation