当前位置:Gxlcms > 数据库问题 > Oracle的存储过程基本写法

Oracle的存储过程基本写法

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

create [or replace] procedure 存储过程名(param1 in type,param2 out type)
as
变量1 类型(值范围);
变量2 类型(值范围);
begin
select count(*) into 变量1 from 表A where列名=param1;
if (判断条件) then
select 列名 into 变量2 from 表A where列名=param1;
dbms_output.Put_line(‘打印信息‘);
elsif (判断条件) then
dbms_output.Put_line(‘打印信息‘);
else
raise 异常名(NO_DATA_FOUND);
end if;
exception
when others then
rollback;
end;

 

Oracle的存储过程基本写法

标签:from   html   log   param   post   https   nbsp   判断   htm   

人气教程排行