Examine the structure of the EMPLOYEES table that exists in your schema.
Name Null? Type
————————– ————— ———————
EMPLOYEE_ID NOT NULL NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
DEPARTMENT_ID NUMBER(4)
You successfully create a GET_MAX procedure to find the maximum salary in the department of a specified employee.
You then code a PL/SQL block to display the maximum salary in the departments of the first five employees in the EMPLOYEES table.
View the Exhibit. Examine the procedure and the block of PL/SQL code.
What is the outcome of executing the block of PL/SQL code?
A.
It executes successfully and gives the required output.
B.
It gives an error because ROWNUM cannot be used in cursor definitions.
C.
It gives an error because usage of the %ROWCOUNT attribute is not valid.
D.
It executes successfully, but does not give the required output because the procedure call resets the %ROWCOUNT value.
A
A.
Checked.
A