Skip to main contentSkip to solution

What will be the output of the following query on table 'STUDENTS'?

SELECT COUNT(*) FROM STUDENTS;

Solution

✅ Correct Option: 3

COUNT(*) counts every row in the table, whether or not some columns hold NULL values. It does not look at individual column values, so each row is counted once.


Option 2: this describes COUNT(column_name), which skips NULLs in that column.

Option 1: COUNT(*) counts rows, not columns.

Keyboard Shortcuts

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