Check sibling questions

Which of the following function gives the total number of rows in a given column or expression?

(A) SUM()

(B) COUNT()

(C) TOTAL()

(D) Both (a) and (b)

 

Answer:

Checking the options

  • (A) SUM() - It returns the total sum of a numeric column.  
  • (B) COUNT() - It returns the number of rows that matches a specified criterion.
  • (C) TOTAL() - It is not an aggregate function in SQL.
  • (D) Both (a) and (b) 

From the above explanation, we understand that it is the COUNT( ) function which gives the total number or rows in a given column or expression.

So, the correct answer is (B)

983 students joined Teachoo Black. What are you waiting for?


Transcript

Which of the following function gives the total number of rows in a given column or expression? (A) SUM() (B) COUNT() (C) TOTAL() (D) Both (a) and (b) Answer: Checking the options (A) SUM() - It returns the total sum of a numeric column. (B) COUNT() - It returns the number of rows that matches a specified criterion. (C) TOTAL() - It is not an aggregate function in SQL. (D) Both (a) and (b) From the above explanation, we understand that it is the COUNT( ) function which gives the total number or rows in a given column or expression. So, the correct answer is (B)

Davneet Singh's photo - Teacher, Engineer, Marketer

Made by

Davneet Singh

Davneet Singh is a graduate from Indian Institute of Technology, Kanpur. He has been teaching from the past 12 years. He provides courses for Maths and Science at Teachoo.