STATEMENT I; SELCET SUM (SALARY), MAX (SALARY),, MIN (SALARY), AVG (SALARY) FROM EMPLOYEE, DERPARTMENT WHERE DECTNO = DID AND DNAME = 'ENGLISH'. STATEMENT II: SELCET SUM (SALARY), MAX (SALARY),, MIN (SALARY), AVG (SALARY) FROM EMPLOYEE, DERPARTMENT WHERE DNAME = 'ENGLISH'.
In the light of the above statements, choose the correct answer from the options given below.
Correct Answer: (c) Statement I is correct but statement II is false
Solution:Two tables (join condition) must be matched so that records can be linked uniquely.
Query :- SUM (SALARY), MAX (SALARY), MIN (SALARY), AVG (SALARY) FROM EMPLOYEE, DERPARTMENT WHERE DEPTNO = DID AND DNAME = 'ENGLISH'
Without DEPTNO = DID condition as in statement II, there will be the Cartesian product of two tables (EMPLOYEE, DEPARTMENT) and it will appear many duplicate row with
DNAME = 'ENGLISH'
Hence statement I is correct but statement II is false.