<pre name="code" class="sql"><pre name="code" class="sql">SQL> create or replace procedure test_1 is
begin
for i in 1 .. 10 loop
DBMS_OUTPUT.PUT_LINE(i);
end loop;
end; 2 3 4 5 6
7 / 过程已创建。 SQL> exec test_1
1
2
3
4
5
6
7
8
9
10 PL/SQL 过程已成功完成。
----------
create or replace procedure bfw_do_select is
begin
for x in (select * from bfw_test2) loop
DBMS_OUTPUT.PUT_LINE(x.id);
end loop;
end;

												

PLSQL 循环示例的更多相关文章

  1. SQL记录-PLSQL循环

    PL/SQL循环   可能有一种情况,当需要执行的代码块的几个多次.在一般情况下,语句顺序执行:一个函数的第一条语句,首先执行,然后是第二个...等等. 编程语言提供了各种控制结构,允许更多复杂的执行 ...

  2. sql中多层循环示例(有游标)

    在需求处理中,我们会遇到需要通过SQL多层循环来处理的问题.如:A表中有8条数据,B表中有10条数据,需要实现A表中的每1条数据对应B表中的10条数据,最后就有了80条数据,从而实现一对多的关系.那如 ...

  3. js for 循环示例

    //for 循环 ,,,,,,]; ; i < array.length; i++) { console.log(i,array[i]); } //for in ,,,,,,]; for(let ...

  4. Python基础入门-while循环示例

    闲来无事! 想写一些基础的东西! 比如今天的while循环,,,,,, 很多python初学者,最开始学习python的时候,会被while循环给干蒙蔽! 那么今天,小编为大家讲解一些基础的实例,来帮 ...

  5. Python3基础 continue while循环示例

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  6. java循环示例

    用while循环计算100之内的奇数和偶数和 public class Test{ public static void main(String[] args){ int sum=0; int num ...

  7. 《foreach循环示例》

    //foreach测试 public class ForEachTest { public static void main(String[] args) { String[] books = {&q ...

  8. mysql存储过程双重循环示例

    BEGIN ); DECLARE done INT DEFAULT FALSE; DECLARE cursor_rule CURSOR FOR SELECT s.id FROM d_menu_type ...

  9. Python3基础 while 循环示例

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

随机推荐

  1. C/C++捕获段错误,打印出错的具体位置(精确到哪一行)

    修订:2013-02-16 其实还可以使用 glibc 的 backtrace_symbols 函数,把栈帧各返回地址里面的数字地址翻译成符号描述的 修订:2011-06-11 背景知识: · 在li ...

  2. bzoj1676[Usaco2005 Feb]Feed Accounting 饲料计算

    Description Farmer John is trying to figure out when his last shipment of feed arrived. Starting wit ...

  3. C#的隐式和显示类型转换

    原文地址:http://blog.csdn.net/yysyangyangyangshan/article/details/7494577 关于隐式转换和显示转换,每种语言都有的,C#中当然也不例外. ...

  4. phpStorm 各种快捷键

    1. ctrl + shift + n: 打开工程中的文件(类似于eclipse中的ctrl+shift+R),目的是打开当前工程下任意目录的文件. 2. ctrl + j: 输出模板 3. ctrl ...

  5. 有趣的JavaScript

    让你的js代码从一行开始,另一行结束: var s /*:String*/ = "Test \ multi \ line."; 看到没,只需要在你换行的字符串后面加上反斜线(bac ...

  6. Perl 多线程模块 Parallel::ForkManager

    Perl 多线程模块 Parallel::ForkManager 一个简单的并行处理模块.这个是用来对付循环的多线程处理. 放在循环前面. Table of Contents 1 Synops内容简介 ...

  7. C++ MPICH

    假设一个C++的MPI程序在单机上能够跑.可是在多机上跑会报下面错误: Fatal error in MPI_Send: Unkown error class , error stack. 解决方法: ...

  8. JMeter Building a Database Test Plan

    Building a Database Test Plan In this section, you will learn how to create a basic Test Planto test ...

  9. [Angular 2] Using the @Inject decorator

    TypeScript is used heavily as we build up our application, but TypeScript isn’t required. If you wan ...

  10. Android 避免APP启动闪黑屏的解决办法(Theme和Style)

    前几天Boss就反应说,机器每次启动程序都会闪一下黑屏,这个客户不接受.没办法,只能想想怎么解决,最后找到了下面的方法.闪黑屏的原因主要是我们启动Activity的时候,需要跑完onCreate和on ...