declare
v_empno scott.emp.empno%type;
v_sal scott.emp.sal%type;
cursor cur_emp(v_empno number default 7369) is
select t.empno, t.sal from scott.emp t where t.empno = v_empno; begin open cur_emp(7566); loop
fetch cur_emp
into v_empno, v_sal; exit when cur_emp%notfound; dbms_output.put_line(v_empno || ' ' || v_sal); end loop; close cur_emp; end;

Oracle PLSQL Demo - 14.定义定参数的显示游标的更多相关文章

  1. Oracle PLSQL Demo - 12.定义包体[Define PACKAGE BODY]

    CREATE OR REPLACE PACKAGE BODY temp_package_demo is FUNCTION f_demo(userid NUMBER) RETURN BOOLEAN IS ...

  2. Oracle PLSQL Demo - 11.定义包头[Define PACKAGE]

    CREATE OR REPLACE PACKAGE temp_package_demo is v_demo ); PROCEDURE p_demo_1(userid NUMBER DEFAULT v_ ...

  3. Oracle PLSQL Demo - 08.定义显式游标[Define CURSOR, Open, Fetch, Close CURSOR]

    declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; cursor cur_emp is select t.empno, t. ...

  4. Oracle PLSQL Demo - 01.定义变量、打印信息

    declare v_sal ) :; begin --if you could not see the output in console, you should set output on firs ...

  5. Oracle plsql存储过程中out模式参数的用法

    在plsql中,存储过程中的out模式的参数可以用来返回数据,相当于函数的返回值.下面是一个小例子. 沿用上一篇的emp表结构和数据. 存储过程如下: create or replace proced ...

  6. Oracle PLSQL Demo - 31.执行动态SQL拿一个返回值

    DECLARE v_sql ) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; E ...

  7. Oracle PLSQL Demo - 29.01.Function结构模板 [无入参] [有返回]

    CREATE OR REPLACE FUNCTION function_name RETURN DATE AS v_date DATE; BEGIN ; dbms_output.put_line(v_ ...

  8. Oracle PLSQL Demo - 27.Declare & Run Sample

    declare v_sal ) :; begin --if you could not see the output in console, you should set output on firs ...

  9. Oracle PLSQL Demo - 24.分隔字符串function

    -- refer: -- http://www.cnblogs.com/gnielee/archive/2009/09/09/1563154.html -- http://www.cnblogs.co ...

随机推荐

  1. vue单文件(sfc)编译为js的流程

    1.流程 2.参考文章地址 https://segmentfault.com/a/1190000012336392 3.Vue框架的parseComponent https://github.com/ ...

  2. webpack 安装以及使用

    1.安装webpack 全局安装代码: npm install -g webpack 2.项目中使用webpack (1)进入项目目录 cd C:\Users\dell\Documents\HBuil ...

  3. isearch5 index,attribute和summary。

    索引 isearch5 支持的索引分为:index,attribute和summary. Index指的是倒排索引,它存储了存储了从term到DocID的映射关系,形如: term-->(Doc ...

  4. STL容器 erase的使用陷井

    http://www.cppblog.com/beautykingdom/archive/2008/07/09/55760.aspx?opt=admin 在STL(标准模板库)中经常会碰到要删除容器中 ...

  5. CSS3+JS 实现的便签应用

    概述 利用HTML5新增的 locationStorage 实现的便签应用,没有使用 JQuery,主要是为了练习原生JS的使用,采用响应式开发,在手机端和桌面端都有良好的体验,而且使用CSS3添加了 ...

  6. supervisor介绍与安装

    前言 今天同事让我帮忙安装一个叫supervisor的软件,但自己确实没接触过这个软件 自己做一下学习的记录 我首先是查询了一下supervisor的官网,初步认识一下这个软件 Supervisor是 ...

  7. 堆 C语言实现

    1.基本概念 堆分为小根堆和大根堆,对于一个小根堆,它是具有如下特性的一棵完全二叉树: (1)若树根结点存在左孩子或右孩子,则根结点的值(或某个域的值)小于等于左右孩子结点的值(或某个域的值) (2) ...

  8. 手机imie号介绍使用

    http://zhidao.baidu.com/question/3682744.html手机机身号又叫手机串号,是国际移动设备识别码,GSM手机机身号简称IMEI,CDMA手机机身号简称ESN. 一 ...

  9. C# 调节图片亮度

    原文地址:https://www.cnblogs.com/wjr408/p/6727118.html 昨天去客户那里测试,需求才开始,所以很简单,就是测一下能不能接受到视频或图片,然后保存下来,现场客 ...

  10. python学习笔记—

    Microsoft Windows [版本 10.0.16299.431](c) 2017 Microsoft Corporation.保留所有权利. C:\Users\zyong>pip in ...