Custom Search

Wednesday 30 November 2011

Write a PL/SQL block to raise the salary by 20% of given employee on following table.., PL/SQL Program to raise the salary by 20% of given employee on following table


Write a PL/SQL block to raise the salary by 20% of given employee on following table.., PL/SQL Program to raise the salary by 20% of given employee on following table

Emp_Salary (eno, ename, city, salary)

Table Creation…

eno number primary key,

ename char(15),

city char(15),

sal number(10,2));

insert into empsal values(1,'Hiral','Mehsana',20000);

insert into empsal values(2,'Pinkey','Mehsana',15000);

insert into empsal values(3,'Dhruvi','Mehsana',10000);


Program…

declare

n number;

s number(10,2);

begin

n:=&n;

--select sal into s from empsal where eno=n;

update empsal set sal=sal+(sal*0.20) where eno=n;

end;

No comments:

Post a Comment

Laptops