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. PHPCMS V9 加密规则

    PHPCMS V9 加密规则 相关表:v9_admin 加密方式: md5(md5(password)+encrypt) 第一步:对输入的密码32位小写   MD5 对输入的密码进行trim过滤 第二 ...

  2. javaweb笔记全套

    Lesson 1 一.eclipse工具的使用 1. java代码的位置 1) 选择工作空间 workspace  选择一个文件夹存放程序(代码) 不要用中文和空格 2) 新建一个java 工程(Pr ...

  3. LogUtils.java

    package com.xdsjs.save.utils; /** * 日志相关管理类 * Created by xdsjs on 2015/10/13. */ import android.util ...

  4. poj 2195 Going Home(最小费最大流)

    poj 2195 Going Home Description On a grid map there are n little men and n houses. In each unit time ...

  5. Best Time to Buy and Sell Stock I && II && III

    题目1:Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of ...

  6. 【面试笔试】Java常见面试笔试总结

    Java 基础 1.有哪些数据类型 Java定义了8种简单类型:byte.short.int.long.char.float.double和boolean. 2.面向对象的语言特征 封装.继承.多态 ...

  7. 关于NHibernate中存在于Session中实例的3种状态的简单分析

    在使用NHibernate的时候.在Session中会有3种状态. 1. 瞬时状态 (Transient) 由 new 命令开辟内存空间的对象,也就是平时所熟悉的普通对象. 如: Student st ...

  8. CUDA 7.0 速查手册

    Create by Jane/Santaizi 03:57:00 3/14/2016 All right reserved. 速查手册基于 CUDA 7.0 toolkit documentation ...

  9. 腾讯云-Linux 基础入门

    Linux 基础入门 目录操作 任务时间:5min ~ 10min 创建目录 使用 mkdir 命令创建目录 mkdir $HOME/testFolder # $HOME 当前用户的家目录  root ...

  10. 在启动vsftpd,有时会报错

    在启动vsftpd,有时会报错:C:>ftp 192.168.0.101Connected to 192.168.0.101.220 (vsFTPd 2.0.5)User (192.168.0. ...