Machine-translated by Google. Questions are authored in English.
Top

Discussion

SELECT DISTINCT is used if a user wishes to see duplicate columns in a query.

  • A.True
  • B.
    False

Answer: B

Correct answer: False

SELECT DISTINCT does the opposite: it removes duplicate rows from the result, returning each distinct combination of the selected values once.

To see duplicates, simply omit it - a plain SELECT returns every row that matches, repetitions included. Note also that DISTINCT applies to the whole selected row rather than to any one column, so SELECT DISTINCT city, state removes only rows where both values repeat.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.