Multiple choice technology databases

How do you find the total number of rows in a table ?

  1. SELECT COUNT *

  2. SELECT COUNT(*)

  3. SELECT COUNT[*]

  4. SELECT COUNT(ALL)

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

SELECT COUNT() is the correct SQL syntax for counting all rows in a table. Option A is missing parentheses, C uses incorrect brackets, and D is not valid syntax for counting all rows. COUNT() counts all rows including NULLs.