Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion (A): COUNT() function ignores distinct values.
Reasoning (R): Distinct clause ignores duplicate values.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
SQL Queries
2 Likes
Answer
A is false but R is true.
Explanation
The COUNT()
function in SQL does not ignore distinct values, it counts all occurrences, including distinct values. On the other hand, the DISTINCT
keyword in SQL eliminates duplicate values, ensuring that only distinct values are considered.
Answered By
3 Likes