标签:
--&变量名,&&变量名简析-----------------------------------------------------------
1 set verify on;
2 select * from tcpn_jodsmapping where productid = ‘&ProductID‘ and producteffdate = ‘&ProductEffdate‘
3 ORDER by ‘&ProductID‘;
4 select * from tcpn_jodsmapping where productid = ‘&&ProductID‘ and producteffdate = ‘&ProductEffdate‘
5 ORDER by ‘&ProductID‘;
-- ACCEPT-----------------------------------------------------------------------
1 ACCEPT pro_pID PROMPT ‘Provide the Product ID and Eff date.‘
2 select * from
3 tcpn_jodsmapping
4 where productid = ‘&pro_pID‘;
--DEFINE-----------------------------------------------------------------------
1 DEFINE DEF010003=010003;
2 DEFINE DEF010003
3 DEFINE DEF01000320090301=20090301;
4 DEFINE DEF01000320090301
5 SELECT * FROM tcpn_paymentitem
6 where productid = ‘&DEF010003‘
7 and PRODUCTEFFDATE = ‘&DEF01000320090301‘;
8 UNDEFINE DEF010003;
9 UNDEFINE DEF01000320090301;
--------------------------------------------------------------------------------
1 declare
2 v_sal number(6,2);
3 v_ename emp.ename%type:=‘&ename‘;
4 begin
5 select sal into v_sal from emp
6 where lower(ename)=lower(v_ename);
7 if v_sal<2000 then
8 update emp set sal=v_sal + 200
9 where lower(ename)=lower(v_ename);
10 end if;
11 end;
标签:
原文地址:http://www.cnblogs.com/Jeffrey-xu/p/5057642.html