Which SQL keyword is used to eliminate duplicate tuples from the result…

2021

Which SQL keyword is used to eliminate duplicate tuples from the result relation?

Answer: B. DISTINCTConceptA SELECT query normally returns every row produced by its projection and filtering steps, including repeated rows. The DISTINCT modifier applies…

  1. A.

    DELETE

  2. B.

    DISTINCT

  3. C.

    NON DUPLICATE

  4. D.

    EXISTS

Show answer & explanation

Correct answer: B

Concept

A SELECT query normally returns every row produced by its projection and filtering steps, including repeated rows.

The DISTINCT modifier applies set-style duplicate elimination to the selected result rows; it does not delete rows from the stored table.

Application

  1. Suppose a column contains the values Delhi, Delhi, and Jaipur.

  2. SELECT city FROM centres returns all three rows, so Delhi appears twice.

  3. SELECT DISTINCT city FROM centres compares the projected city values and returns Delhi and Jaipur once each.

Contrast

  • DELETE removes stored rows that satisfy a condition; it is not a modifier for deduplicating a query result.

  • NON DUPLICATE is not a standard SQL keyword.

  • EXISTS tests whether a subquery returns at least one row; it does not collapse repeated result rows.

Result

Therefore, the keyword used to eliminate duplicate tuples from the result relation is DISTINCT.

Explore the full course: Uppsc Computer Operator Grade B

Loading lesson…