当前位置:Gxlcms > 数据库问题 > oracle PL/SQL编程语言之out关键字的使用

oracle PL/SQL编程语言之out关键字的使用

时间:2021-07-01 10:21:17 帮助过:21人阅读

number) as sal number(10); comm number(10); begin select sal,nvl(comm, 0) into sal,comm from emp where empno = eno; yearsal := sal * 12 + comm; end;

 

测试使用存储过程代码如下:

declare
  s number(10);
begin
  p_yearsal(7788,s);
  dbms_output.put_line(s);
end;

注意:使用out关键字的参数必须在存储过程业务逻辑中使用into或:=赋值,否则报错。

oracle PL/SQL编程语言之out关键字的使用

标签:declare   赋值   sql   使用   ora   可靠性   replace   指定   返回   

人气教程排行