You are on page 1of 2

[Année]

[Titre du document]

INGENIEUR
[Nom de la société]
[Date]
OK

OK

OK

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 the 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 employees WHERE ROWNUM < 10

You might also like