new_salary1 OUT NUMBER,
new_salary2 OUT NUMBER
[@more@]测试 procedure OUT 参数
CREATE OR REPLACE PACKAGE body test_parameter_out
AS
PROCEDURE update_someone_salary (
employee_id IN NUMBER,
new_salary OUT NUMBER,
new_salary1 OUT NUMBER,
new_salary2 OUT NUMBER
)
IS
v_employee_id NUMBER;
v_salary number;
BEGIN
v_employee_id := employee_id;
UPDATE hr.employees
SET salary = 10000
WHERE employee_id = v_employee_id;
SELECT salary
INTO new_salary
FROM hr.employees
WHERE employee_id = v_employee_id;
new_salary := new_salary + 88;
new_salary1 := new_salary + 100;
new_salary2 := new_salary1 + 100;
END;
END;
declare
new_salary number;
new_salary1 number;
new_salary2 number;
begin
hr.test_parameter_out.update_someone_salary(102, new_salary, new_salary1, new_salary2);
dbms_output.put_line(new_salary ||||new_salary1|| ||new_salary2 );
end;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/226700/viewspace-861640/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/226700/viewspace-861640/