KnowledgeBoat Logo

Class - 12 CBSE Computer Science — Assertion Reason Type Questions

Assertion. The count(*) will yield a single value while round() will yield number of values equal to the cardinality of the table.

Reason. The count (*) is a multiple-rows function and round() is a single-row function.

  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

2 Likes

Answer

Both A and R are true and R is the correct explanation of A.

Explanation
The count(*) function returns a single value, while round() will yield number of values equal to the cardinality (rows) of the table. This is because count() operates on all rows in a table (or a group of rows), producing a single result. In contrast, round() operates on each row individually, producing multiple results depending on the cardinality of the table.

Answered By

3 Likes