ITPub博客

首页 > 应用开发 > IT综合 > 测试 procedure OUT 参数

测试 procedure OUT 参数

原创 IT综合 作者:moonsoft 时间:2019-04-19 19:12:07 0 删除 编辑
new_salary OUT NUMBER,

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2005-01-20

  • 博文量
    246
  • 访问量
    183827