Multiple choice technology databases

Use these data for the following Questions EMPNO ENAME SAL E100 John 3250 E200 Praveen 2000 E300 Mahesh E400 Prasanth 5500 E500 Vikram 6650 Select count (sal) from Emp will retrieve

  1. 1

  2. 0

  3. 3

  4. 4

  5. None of the above

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

COUNT(SAL) counts the number of non-NULL values in the SAL column. Looking at the data: John has 3250, Praveen has 2000, Prasanth has 5500, Vikram has 6650, but Mahesh (E300) has no salary listed (NULL). Therefore there are 4 non-NULL salary values, so COUNT(SAL) returns 4.