Multiple choice technology mainframe

With SQL, how can you return the number of records in the "Persons" table?

  1. SELECT COUNT(*) FROM Persons

  2. SELECT COLUMNS() FROM Persons

  3. SELECT COLUMNS(*) FROM Persons

  4. SELECT COUNT() FROM Persons

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

COUNT(*) with SELECT returns the total number of rows in a table. The asterisk ensures all rows are counted regardless of NULL values in any column.