Oracle PLSQL Demo - 27.Declare & Run Sample
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的更多相关文章
- Oracle PLSQL Demo - 31.执行动态SQL拿一个返回值
DECLARE v_sql ) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; E ...
- Oracle PLSQL Demo - 22.查看字符串的长度[lengthb, length],判断字符串是否包含中文
--Count the length of string select lengthb('select * from scott.emp') as countted_by_byte, length(' ...
- Oracle PLSQL Demo - 20.弱类型REF游标[没有指定查询类型,也不指定返回类型]
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_ename ); v_deptno ); v ...
- Oracle PLSQL Demo - 17.游标查询个别字段(非整表)
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; v_empno scott.emp.empno% ...
- Oracle PLSQL Demo - 16.弱类型REF游标[没有指定查询类型,已指定返回类型]
declare Type ref_cur_variable IS REF cursor; cur_variable ref_cur_variable; rec_emp scott.emp%RowTyp ...
- 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 ...
- 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 ...
- 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; ...
- 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 ...
随机推荐
- IDE、SATA、SCSI、SAS、FC、SSD硬盘类型介绍
参考于:http://blog.csdn.net/tianlesoftware/article/details/6009110 目前所能见到的硬盘接口类型主要有IDE.SATA.SCSI.SAS.FC ...
- js 深冻结 与 浅冻结 Object.freeze
1.深冻结 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <t ...
- 【JS】怎样同一时候处理多个window.onload事件
有时引用其他js时,其js却使用了window.onload事件,这种话,引入的页面的onload事件就有可能执行不了.如何才干两个都执行呢?除了将两个写到一块儿去的方法外,还有其他的方法 if(wi ...
- poj 4014 Dice 贪心
//poj 4014 //sep9 #include <iostream> #include <algorithm> using namespace std; int n; s ...
- [Done]SnowFlake 分布式环境下基于ZK构WorkId
Twitter 的 Snowflake 大家应该都熟悉的,先上个图: 时间戳 序列号一般不会去改造,主要是工作机器id,大家会进行相关改造,我厂对工作机器进行了如下改造(估计大家都差不多吧,囧~~~ ...
- newInstance() 的参数版本与无参数版本
通过反射创建新的类示例,有两种方式: Class.newInstance() Constructor.newInstance() 以下对两种调用方式给以比较说明: Class.newInstance ...
- 用sed替换文件中的空格
请教sed 替换问题 请教各位如何替换多个空格为一个字符,如一个文件中间隔符有是一个空格,有的地方是多个空格,想全部用“|”替换,如何处理,请指教 请教sed 替换问题 [code]sed '/ \+ ...
- 示例:Socket应用之简易聊天室
在实际应用中,Server总是在指定的端口上监听是否有Client请求,一旦监听到Client请求,Server就会启动一个线程来响应该请求,而Server本身在启动完线程之后马上又进入监听状态. 示 ...
- PHP-多域名单点登陆方案
1.只是二级域名不同(比如a.xx.com, b.xx.com) 利用cookie, 设置domain为".xx.com"即可 2.多个本域名都不相同(比如www.a.com, w ...
- HDUOJ----3342Legal or Not
Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tota ...