创建存储过程
create or replace procedure test(var_name_1 in varchar2,var_name_2 out integer) as
–声明变量(变量名 变量类型)
begin
–存储过程的执行体
end test;
其中
in 是参数的默认模式,这种模式就是在程序运行的时候已经具有值,在程序体中值不会改变。
out模式定义的参数只能在过程体内部赋值,表示该参数可以将某个值传递回调用他的过程
另外还有一个in out 表示高参数可以向该过程中传递值,也可以将某个值传出去
例如
create or replace procedure test(aaa in varchar2,) is
begin
dbms_output.put_line('The input date is:'||to_date(workDate,'yyyy-mm-dd'));
end test;