KnowledgeBoat Logo

Computer Science

Assertion (A): COUNT() function ignores distinct values.

Reasoning (R): Distinct clause ignores duplicate values.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.

SQL Queries

1 Like

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

2 Likes


Related Questions