Examine the statement of correlated subquery in the following cursor declaration. DECLARE CURSOR c1 IS SELECT D1.deptno, D1.loc, E1.Totalemp FROM dept D1, (SELECT deptno, COUNT(*) Totalemp FROM emp GROUP BY deptno) E1 WHERE D1.deptno = E1.deptno AND E1.Totalemp > 6; Why does this statement result in an error?

  1. Parameter has to be used in this cursor to make its execution successful.

  2. Correlated subquery cannot be used in CURSOR declaration.

  3. Correlated FROM clause subquery cannot be used in CURSOR declaration.

  4. AND logical operator cannot be used in WHERE clause of cursor declaration.

  5. No logical error.


Correct Option: E

Find more quizzes: