Multiple choice technology databases

COUNT(DISTINCT expr) returns

  1. No. of rows in a table

  2. No. of rows with non-null values of the expr

  3. No. of distinct non-null values of the expr

  4. None of the above

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

COUNT(DISTINCT expr) counts unique non-null values. Unlike regular COUNT which counts total rows, DISTINCT removes duplicates before counting. NULL values are always excluded from the count.