Which of the following clause is used with SELECT command in MySQL to avoid…
2023
Which of the following clause is used with SELECT command in MySQL to avoid duplication of output rows.
- A.
NO DUPLICATE
- B.
UNIQUE
- C.
DISTINCT
- D.
NO REPEAT
Attempted by 2524 students.
Show answer & explanation
Correct answer: C
Answer: The DISTINCT clause removes duplicate rows from the SELECT result set and ensures only unique rows are returned. Notes: DISTINCT applies to the set of columns in the SELECT list; when multiple columns are selected, uniqueness is determined by the combined values of those columns.
A video solution is available for this question — log in and enroll to watch it.