Interview Questions

My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?

DB2 INTERVIEW QUESTIONS


(Continued from previous question...)

My SQL statement SELECT AVG(SALARY) FROM EMP yields inaccurate results. Why?

Because SALARY is not declared to have NULLs and the employees for whom the salary is not known are also counted.

(Continued on next question...)

Other Interview Questions