Which SQL keyword is used to eliminate duplicate rows from a query result?
Options
-
A.
UNIQUE
-
B.
DISTINCT
-
C.
DIFFERENT
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
B.
DISTINCT
Detailed Explanation
- DISTINCT: Removes duplicate rows from the query result.
- It can be applied to one or more selected columns.
- Example: SELECT DISTINCT department_id FROM employees;
OOps! You are currently offline.