You are on page 1of 5

[TITRE DU DOCUMENT] [Sous-titre du

document]

[Attirez votre lecteur avec un résumé attrayant. Il s’agit généralement


d’une brève synthèse du document. Lorsque vous êtes prêt à ajouter
votre contenu, cliquez ici et commencez à taper.]
Incorrect Incorrect. Refer to Section 5 44. What is wrong with the following code? DECLARE CURSOR

dept_curs IS SELECT * FROM departments; BEGIN FOR dept_rec IN dept_curs LOOP

DBMS_OUTPUT.PUT_LINE(dept_curs%ROWCOUNT || dept_rec.department_name); END LOOP;

DBMS_OUTPUT.PUT_LINE(dept_rec.department_id); END; Mark for Review (1) Points The cursor

DEPT_CURS has not been opened. The implicitly declared record DEPT_REC cannot be referenced
outside th

e cursor FOR loop. (*) You cannot use %ROWCOUNT with a cursor FOR loop. The cursor DEPT_CURS
has not been closed. Nothing is wrong, this code will execute successfully. Incorrect Incorrect. Refer

to Section 5 45. What is wrong with the following code? BEGIN FOR emp_rec IN (SELECT * FROM e

mployees WHERE ROWNUM < 10

You might also like