Multiple choice technology databases

A employee table contain below values empno empname deptno salary 1 aaa 10 30000 2 bbb 20 25000 3 ccc 10 Null 4 ddd Null 35000 Select avg(Isnull(salary,10000)) from employee?

  1. 0

  2. 30000

  3. 25000

  4. 35000

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

The query uses Isnull(salary,10000) which replaces NULL with 10000. Averaging: (30000+25000+10000+35000)/4 = 100000/4 = 25000. This appears to be SQL Server syntax (ISNULL with one L), not MySQL (IFNULL).