- Home
- Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. The ALL and DISTINCT clauses of
Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. The ALL and DISTINCT clauses of a SELECT query are related.
Reason. The ALL clause is the opposite of the DISTINCT clause of a SELECT Query.
Answer
(a)
Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
Explanation
The ALL
and DISTINCT
clauses in a SELECT
query are related in that they both affect how duplicate rows are handled in the result. The DISTINCT
keyword in SQL is used to eliminate duplicate rows from the results of a query. The ALL
keyword in SQL is used to retain the duplicate rows from the results of a query. Therefore, the ALL
clause is the opposite of the DISTINCT
clause of a SELECT
Query.