Which two calls to the RAISE_SALABY procedure in the anonymous block execute successfully?

View Exhibit1 and examine the structure of the EMP table.

View Exhibit2 and examine the code.

EKPNOS 7845 and 7900 exist in the EMP table.
Which two calls to the RAISE_SALABY procedure in the anonymous block execute successfully?

(Choose two.)

View Exhibit1 and examine the structure of the EMP table.

View Exhibit2 and examine the code.

EKPNOS 7845 and 7900 exist in the EMP table.
Which two calls to the RAISE_SALABY procedure in the anonymous block execute successfully?

(Choose two.)

A.
call in line 6

B.
call in line 7

C.
call in line 8

D.
call in line 9



Leave a Reply 8

Your email address will not be published. Required fields are marked *


Alisa

Alisa

create table emp (
EMPNO NUMBER(4),
ENAME VARCHAR2(10), JOB VARCHAR2(9),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2));
/
drop table emp;
/

CREATE OR REPLACE PROCEDURE raise_salary
(emp_id IN NUMBER, amount IN NUMBER,extra IN NUMBER DEFAULT 50)
IS
BEGIN
UPDATE emp SET sal = sal + NVL(amount,0) + extra
WHERE empno = emp_id;
END raise_salary;
/

DECLARE
emp_num NUMBER(6) := 7900;
bonus NUMBER(6);
merit NUMBER(4);
BEGIN
raise_salary (7845);
raise_salary (emp_num, extra => 25);
raise_salary (7845, NULL, 25);
raise_salary(emp_num, extra => 25, amount => NULL);
raise_salary(emp_num, 7, 99);
END;

You can specify the name of each parameter along with its value. An arrow (=>) serves as the association operator.

alex

alex

Results of each call:
Line 6: PLS-00306: wrong number or types of arguments in call to ‘RAISE_SALARY’
Line 7: PLS-00306: wrong number or types of arguments in call to ‘RAISE_SALARY’
Line 8: PL/SQL procedure successfully completed
Line 9: PL/SQL procedure successfully completed.

Correct answer: C and D