Saturday, September 19, 2020

RDBMS PLSQL Program 16 get data from user, select and update table

 set serveroutput on

declare

VEno Emp.Eno%TYPE;

VESalary Emp.ESalary%TYPE;

begin

VEno := '&VEno';

select ESalary into VESalary from Emp

where Eno = VEno;

if VESalary > 50000 then 

VESalary := VESalary - 3000;

update emp set ESalary = VESalary 

where Eno = VEno;

end if;

end;

commit;

/

No comments:

Post a Comment

Thanks for showing your interest
I will shortly get back to you