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 has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 13 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.
Hi, it looks like you're using AdBlock :(
Displaying ads are our only source of revenue. To help Teachoo create more content, and view the ad-free version of Teachooo... please purchase Teachoo Black subscription.
Please login to view more pages. It's free :)
Teachoo gives you a better experience when you're logged in. Please login :)
Solve all your doubts with Teachoo Black!
Teachoo answers all your questions if you are a Black user!