What does the DISTINCT keyword do in a SELECT list?
-
A
Keeps only rows with NULLs
-
B
Removes duplicate result rows
Correct answer
-
C
Sorts the result rows
-
D
Counts repeated rows
Correct answer
B. Removes duplicate result rows
16 views
Explanation
DISTINCT collapses rows whose selected values are all equal into a single row.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ