本人是过程Oracle 的热捧者,以下的存储相关内容主要是我个人对于Oracle存储过程的一个总结,其中包括储存过程的过程创建,以及变量赋值的存储实际应用,以下就是过程文章的具体内容的描述,希望你会有所收获。存储
1、过程创建存储过程
- create or replace procedure test
(var_name_1 in type,存储var_name_2 out type) as
声明变量(变量名 变量类型)
- begin
Oracle存储过程的执行体
- end test;
打印出输入的时间信息
- E.g:
- create or replace procedure test(workDate in Date) is
- begin
- dbms_output.putline('The input date is:'
||to_date(workDate,'yyyy-mm-dd'));- end test;
2、变量赋值
变量名 := 值;
- E.g:
- create or replace procedure test(workDate in Date) is
- x number(4,过程2);
- begin
- x := 1;
- end test;
3、判断语句
if 比较式 then begin end; end if;
- E.g
- create or replace procedure test(x in number) is
- begin
- if x >0 then
- begin
- x := 0 - x;
- end;
- end if;
- if x = 0 then
- begin
- x: = 1;
- end;
- end if;
- end test;
上述的存储相关内容就是对Oracle存储过程总结的描述,希望会给你带来一些帮助在此方面。过程
【编辑推荐】
责任编辑:佚名 来源: 博客园 Oracle存储过程
(责任编辑:热点)
新作《饿狼传说City of the Wolves》公布 经典角色回归
兴达国际(01899.HK)发布公告:预期2020年纯利同比减少50%
剧场版《数码宝贝大冒险02 THE BEGINNING》新剧照
凯撒文化(002425.SZ)业绩快报:2020年度净利润降40.8% 基本每股收益0.15元
Google Assistant 马上就能“开眼”了,Pixel 2/XL 会更好卖吗?