Skip to main contentSkip to solution

Which of the following is used to find total number of rows in a table?

Solution

✅ Correct Option: 4

COUNT(*) counts every row in a table, including rows that contain NULL values. For example, SELECT COUNT(*) FROM student; returns the total number of rows in the table student.


MAX(), SUM() and AVG(): these work on the values of one numeric column (largest value, total, average). They do not count rows.

COUNT(column_name) skips NULL values in that column, so it can give a smaller number than COUNT(*).

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question