oralce存储过程双循环
来源:互联网 发布:打印机服务器软件 编辑:程序博客网 时间:2024/05/29 15:08
while vs_esti_dateJ < sysdate loop
前需要给J重新赋值
SQL> create or replace function f2w
2 return int
3 as
4 i int;
5 j int;
6 begin
7 i:=1;
8 j:=2;
9 while i<5 loop
10 while j<5 loop
11 dbms_output.put_line('i='||i||' j='||j);
12 j:=j+1;
13 end loop;
14 i:=i+1;
15 end loop;
16
17 return 0;
18 end;
19 /
函数已创建。
SQL> select f2w from dual;
F2W
----------
0
i=1 j=2
i=1 j=3
i=1 j=4
SQL> create or replace function f2w
2 return int
3 as
4 i int;
5 j int;
6 begin
7 i:=1;
8 j:=2;
9 while i<5 loop
10 j:=i+1; -- add this line
11 while j<5 loop
12 dbms_output.put_line('i='||i||' j='||j);
13 j:=j+1;
14 end loop;
15 i:=i+1;
16 end loop;
17
18 return 0;
19 end;
20 /
函数已创建。
SQL> select f2w from dual;
F2W
----------
0
i=1 j=2
i=1 j=3
i=1 j=4
i=2 j=3
i=2 j=4
i=3 j=4
前需要给J重新赋值
SQL> create or replace function f2w
2 return int
3 as
4 i int;
5 j int;
6 begin
7 i:=1;
8 j:=2;
9 while i<5 loop
10 while j<5 loop
11 dbms_output.put_line('i='||i||' j='||j);
12 j:=j+1;
13 end loop;
14 i:=i+1;
15 end loop;
16
17 return 0;
18 end;
19 /
函数已创建。
SQL> select f2w from dual;
F2W
----------
0
i=1 j=2
i=1 j=3
i=1 j=4
SQL> create or replace function f2w
2 return int
3 as
4 i int;
5 j int;
6 begin
7 i:=1;
8 j:=2;
9 while i<5 loop
10 j:=i+1; -- add this line
11 while j<5 loop
12 dbms_output.put_line('i='||i||' j='||j);
13 j:=j+1;
14 end loop;
15 i:=i+1;
16 end loop;
17
18 return 0;
19 end;
20 /
函数已创建。
SQL> select f2w from dual;
F2W
----------
0
i=1 j=2
i=1 j=3
i=1 j=4
i=2 j=3
i=2 j=4
i=3 j=4
0 0
- oralce存储过程双循环
- 存储过程,游标,if,双游标,双循环
- oralce 存储过程
- Oralce存储过程
- ORALCE 存储过程
- Oralce存储过程动态调用其它过程
- oralce中存储过程--Insert
- oralce jobs 定时执行一个存储过程
- Oralce存储过程的创建和调用
- Oralce 写一个分页的存储过程
- oralce存储过程的基本语法
- oralce存储过程的基本语法
- Oralce 定时任务 调用存储过程
- Oralce存储过程中创建表
- oralce 存储过程 游标的使用
- Oralce存储过程之包内调用其他过程
- Oralce数据库定时执行存储过程的设置
- oralce 存储过程传入 record 类型的参数??
- VB程序学习代码记录20160721
- 【离散数学】单向连通和弱连通的区别
- Codeforces Round #337 (Div. 2) A-----思维题
- Box of bricks 堆积木
- HDU 5744 Keep On Movin(胡搞)
- oralce存储过程双循环
- Android简介
- 欢迎使用CSDN-markdown编辑器
- 代理模式,简单(静态)工厂模式,单例模式,模板方法模式个人理解
- Hibernate灵活查询
- 16.对子集padding 对父级没有影响
- js替换字符串中所有/全部空格
- Android中的基础----各种LaunchMode的使用
- 【操作系统】输入输出系统(下下)-思维导图0.0