Multiple choice technology databases

What is the output of the below query: if table A is having 16 rows: select count(*) from A having 1=10;

  1. No rows will be displayed

  2. 0

  3. 16

  4. None

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

The count(*) aggregate produces one row. HAVING 1=10 evaluates to FALSE, which eliminates this single aggregated row. When HAVING eliminates all groups, no rows are returned - not 0 or NULL, but literally no result rows. This is different from returning a count of 0.