declare
v_sal number(5) := 6000;
begin
--if you could not see the output in console, you should set output on first use the command in command line : set serveroutput on
dbms_output.put_line(v_sal);
end;

Oracle PLSQL Demo - 27.Declare & Run Sample的更多相关文章

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

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

  2. Oracle PLSQL Demo - 22.查看字符串的长度[lengthb, length],判断字符串是否包含中文

    --Count the length of string select lengthb('select * from scott.emp') as countted_by_byte, length(' ...

  3. Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]

    declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_ename ); v_deptno ); v ...

  4. Oracle PLSQL Demo - 17.游标查询个别字段(非整表)

    declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno% ...

  5. Oracle PLSQL Demo - 16.弱类型REF游标[没有指定查询类型,已指定返回类型]

    declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; rec_emp scott.emp%RowTyp ...

  6. Oracle PLSQL Demo - 15.强类型REF游标[预先指定查询类型与返回类型]

    declare Type ref_cur_emp IS REF CURSOR RETURN scott.emp%RowType; cur_emp ref_cur_emp; rec_emp cur_em ...

  7. Oracle PLSQL Demo - 14.定义定参数的显示游标

    declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; ) is select t.empno, t.sal from scot ...

  8. Oracle PLSQL Demo - 13.游标的各种属性[Found NotFound ISOpen RowCount CURSOR]

    declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t; begin open cur_emp; ...

  9. Oracle PLSQL Demo - 10.For Loop遍历游标[FOR LOOP CURSOR]

    declare cursor cur_emp is select t.* from scott.emp t; begin for r_emp in cur_emp loop dbms_output.p ...

随机推荐

  1. git删除本地的资源,如何恢复?

    1.$ git reset --hard HEAD  将提交重置 2.使用 $ git checkout TestTimer.java(文件名) 恢复过来了

  2. Java Lombok 减少代码冗余 get set

    1.下载 2.安装 java -jar Users\uatww990393\Desktop\lombok-1.16.16.jar a. 直接添加jar包到lib中  在java中项目中使用lombok ...

  3. ios8.1.3Cydia重装

    1.下载deb包 2.把包放到/var/mobile/Media/下 3.终端输入:dpkg -i /var/mobile/Media/*.deb 然后输入:su -c uicache mobile ...

  4. Filezilla开源FTP传输工具

    生于忧患,死于安乐!在进取中思考... 官网:https://filezilla-project.org/ #FileZilla截图 免费.开源的FTP链接工具! 云下载: http://pan.ba ...

  5. linux 文件操作库函数

    fopen :打开文件 fread :读文件 fwrite : 写文件 fgetc : 读字符 fputc : 写字符 fscanf : 格式化读 fprintf : 格式化写 fseek : 文件偏 ...

  6. TP3.2实例化复杂模型类

    1.表名:xxf_witkey_member_oauth M方法,直接实例化对象:M('member_oauth','xxf_witkey_'[,'db_config']); 具体解析:M方法三个参数 ...

  7. 创建表时 ORA-00955: 名称已由现有对象使用

    如下,在执行创建表语句时报错如下: 执行下面sql查询 select a.OBJECT_type,a.* from all_objects a where upper(a.OBJECT_NAME) = ...

  8. 在asp.net中执行存储过程(转)

    摘自:http://www.cnblogs.com/smhy8187/articles/677742.html 声明:本例用的数据库是系统提供的pubs数据库,表是是employee,编程语言用C# ...

  9. 简单的java实验,涉及到 类继承以及接口问题,方法体的重写(区别于重载)

    package test ; abstract class Animal { abstract void cry(); abstract String getAnimalName(); } class ...

  10. 分布式缓存技术memcached学习系列(二)——memcached基础命令

    上文<linux环境下编译memcahed>介绍了memcahed在linux环境下的安装以及登录,下面介绍memcahed的基本命令的使用. Add 功能:往内存增加一条新的缓存记录 语 ...