CBSE Class 12 Computer Science Question 31 of 91

Grouping Records, Joins in SQL — Question 9

Back to all questions
9
Question

Question 9

Which SQL function is used to count the number of rows in a SQL query ?

  1. COUNT()
  2. NUMBER()
  3. SUM()
  4. COUNT(*)
Answer

COUNT(*)

Reason — The SQL function COUNT(*) is used to count the number of rows in an SQL query, including duplicates and rows with NULL values.