Multiple choice technology databases

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

  1. SELECT COLUMNS(*) FROM Persons ;

  2. SELECT COUNT() FROM Persons;

  3. SELECT COUNT(*) FROM Persons;

  4. SELECT COLUMNS() FROM Persons;

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

COUNT(*) is the SQL aggregate function that returns the total number of rows. COLUMNS is not a valid SQL keyword, and COUNT() requires parentheses with an argument.