Subprogram Calls Using Positional, Named, and Mixed Notation
DECLARE
emp_num NUMBER(6) := 120;
bonus NUMBER(6) := 50;
PROCEDURE Raise_salary
(emp_id NUMBER,
amount NUMBER)
IS
BEGIN
UPDATE employees
SET salary = salary + amount
WHERE employee_id = emp_id;
END raise_salary;
BEGIN
Raise_salary(emp_num,bonus); -- positional procedure call for actual parameters
Raise_salary(amount => bonus,emp_id => emp_num); -- named parameters
Raise_salary(emp_num,amount => bonus); -- mixed parameters
END;
/
0 comments:
Post a Comment