declare
v_sal number;
begin
select t.sal into v_sal from scott.emp t where rownum <= 1;
dbms_output.put_line(v_sal);
end;

Oracle PLSQL Demo - 02.SELECT INTO单行赋值[SELECT INTO variables]的更多相关文章

  1. Oracle PLSQL Demo - 18.02.管道function[查询零散的字段组成list管道返回] [字段必须对上]

    --PACKAGE CREATE OR REPLACE PACKAGE test_141215 is TYPE type_ref IS record( ENAME ), SAL )); TYPE t_ ...

  2. MySQL PLSQL Demo - 002.变量定义、赋值

    drop procedure if exists p_hello_world; create procedure p_hello_world() begin declare v_number int; ...

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

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

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

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

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

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

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

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

  7. Oracle PLSQL Demo - 19.管道function[查询整表组成list管道返回]

    create or replace function function_demo RETURN emp PIPELINED as Type ref_cur_emp IS REF CURSOR RETU ...

  8. Oracle PLSQL Demo - 18.01管道function[查询零散的字段组成list管道返回]

    --PACKAGE CREATE OR REPLACE PACKAGE test_141213 is TYPE type_ref IS record( ENAME ), WORK_CITY ), SA ...

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

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

随机推荐

  1. $stateParams 详解

     如何传递参数(参考 http://www.cnblogs.com/jager/p/5293225.html) 首先,要在目标页面定义接受的参数: 传参, ui-sref: $state.go: 接收 ...

  2. DOS批处理高级教程

    转载-->http://blog.csdn.net/lanbing510/article/details/7461073 前言 本教程主要引用伤脑筋版主的系列文章,同时参考引用[英雄]教程等其他 ...

  3. javaScriptObject转String

    function obj2str(o){ var r = []; if(typeof o =="string") return "\""+o.repl ...

  4. SQL Server表描述 及 字段描述的增、删、改、查询

    SQL Server表描述 及 字段描述的增.删.改.查询 --测试: --创建表及描述信息 ),isname )) --为表添加描述信息 EXECUTE sp_addextendedproperty ...

  5. Python之L.pop()和del L[i]

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #Python之L.pop()和del L[i] #http://python.jobbole.com/826 ...

  6. c语言转移符和三字母序列

    三字母序列

  7. linux软硬链接

    ln分为软链接和硬链接 1.软连接 -s   ln -s /mnt/hgfs/SHARE hvshare2 相当于在当前目录下新建一个名为hvshare2的快捷方式指向/mnt/hgfs/SHARE路 ...

  8. 2014年15款新评定的最佳PHP框架

    通常,框架都会被认为是帮助开发者快速设计和开发动态网站的软件应用.每个月都有极大数量的新发布的 PHP 框架,使网站开发更简单更高效. 如果你是位 PHP 开发者,正在寻找当前最好的一些 PHP 框架 ...

  9. Linux命令-进程查看命令:ps

    查看进行 ps aux

  10. @Html.Display @Html.LabelFor @Html.EditorFor Html.DisplayForModel Html.LabelForModel Html.EditorForModel