Multiple choice technology databases

Which method returns the number of rows in a set.

  1. sum

  2. num_rows

  3. count

  4. total

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The COUNT() function is specifically designed to return the number of rows in a result set or table. SUM adds numeric values, num_rows is not a standard SQL function (it may exist in specific programming interfaces), and 'total' is not a built-in SQL function. COUNT is the universal SQL method for row counting.