收藏文章 楼主

Oracle的存储过程基本写法

版块:数据库存储过程   类型:普通   作者:小绿叶技术博客   查看:1959   回复:2   获赞:0   时间:2020-12-23 14:15:38

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 数据库存储过程

oracle 菜鸟教程

提供企业建站服务,免费网防系统,提交信息登录 http://yundun.ddoss.cn 邮箱: proposal@ddoss.cn 
回复列表
默认   热门   正序   倒序

回复:Oracle的存储过程基本写法

头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息