PLSQL 一般变量与替代变量
2014-03-18 00:00
330 查看
摘要: 一般变量与替代变量实例
--&变量名,&&变量名简析----------------------------------------------------------- set verify on; select * from tcpn_jodsmapping where productid = '&ProductID' and producteffdate = '&ProductEffdate' ORDER by '&ProductID'; select * from tcpn_jodsmapping where productid = '&&ProductID' and producteffdate = '&ProductEffdate' ORDER by '&ProductID'; -- ACCEPT----------------------------------------------------------------------- ACCEPT pro_pID PROMPT 'Provide the Product ID and Eff date.' select * from tcpn_jodsmapping where productid = '&pro_pID'; ------------------------------------------------------------------------------- --DEFINE----------------------------------------------------------------------- DEFINE DEF010003=010003; DEFINE DEF010003 DEFINE DEF01000320090301=20090301; DEFINE DEF01000320090301 SELECT * FROM tcpn_paymentitem where productid = '&DEF010003' and PRODUCTEFFDATE = '&DEF01000320090301'; UNDEFINE DEF010003; UNDEFINE DEF01000320090301; -------------------------------------------------------------------------------- declare v_sal number(6,2); v_ename emp.ename%type:='&ename'; begin select sal into v_sal from emp where lower(ename)=lower(v_ename); if v_sal<2000 then update emp set sal=v_sal + 200 where lower(ename)=lower(v_ename); end if; end;
相关文章推荐
- ORACLE变量定义及使用(另,T-SQL EXISTS的PLSQL替代写法)
- PHP类中动态添加变量——神一般的设定
- 变量内容的删除、替代与替换(常用)
- Ubuntu命令学习:bash中变量内容的删除、替代与替换
- Oracle---替代变量
- PLSQL 之类型、变量和结构
- Oracle替代变量(Substitution Variable )的用法
- SpingMvc中的控制器的注解一般用那个,有没有别的注解可以替代
- 2-6 变量 内容的删除 替换 替代
- PHP的isset()函数 一般用来检测变量是否设置
- C语言---程序的一般形式、数据类型、常量变量、运算符、表达式、格式化输入输出
- (转)C++ 一般类型与变量
- plsql中使用绑定变量
- 代码大全第二版读书笔记 第三部分-变量 十、使用变量的一般事项
- 114.Oracle数据库SQL开发之 PLSQL编程——变量和类型
- SpingMvc中的控制器的注解一般用那个,有没有别的注解可以替代
- Oracle12C--替代变量(六)
- QString::arg()//用字符串变量参数依次替代字符串中最小数值
- 【PLSQL系列】1.变量
- 示例一个PLSQL完成功能来说明PLSQL的作用(定义变量+异常处理+抛异常)