Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> substitution variable
Hello
I found code which should increase by 10% employee's salary (for those who earn less than 1000). Does this code work ? It's said that it' using substitution variables. I looked in documentation but there was said that i can create such variable by define, or accept...
Declare
V_sal emp.sal%TYPE;
Begin
Select Sal Into V_sal From emp where empno = and P_empno //? if (V_sal<1000) then update emp set sal:=sal*1.1 where empno= and P_empno; //? endif;
How this code works ? (How does it loop for all emplyees ?) (or maybe here is error, so how should it be corrected ?)
Thanx
Michal
Received on Sun Dec 26 2004 - 01:45:07 CST
![]() |
![]() |