Formal Parameters and Actual Parameters
DECLARE
emp_num NUMBER(6) := 120;
bonus NUMBER(6) := 100;
merit NUMBER(4) := 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); -- procedure call specifies actual parameters
Raise_salary(emp_num,merit + bonus); -- expressions can be used as parameters
END;
/
0 comments:
Post a Comment