Procedure with Parameters
An IN parameter (the default) provides values for a subprogram to process.
An OUT parameter returns a value to the caller.
An IN OUT parameter supplies an input value, which may be returned (output) as a modified value.
CREATE OR REPLACE PROCEDURE raise_salary
(id IN employees.employee_id%TYPE,
percent IN NUMBER)
IS
BEGIN
UPDATE employees
SET salary = salary * (1 + percent/100)
WHERE employee_id = id;
END raise_salary;
/
BEGIN
raise_salary(176, 10);
END;
/
0 comments:
Post a Comment