Iam abhilash ..
suppose we have 4 fields .. like Empid ,Name,Salary,NetPay..
who's employees earn < 5000 salary those people get 10% comission so that employees salary +comission ..updated into NetPAy column in same table four fields..
i need stored procedure ....
this is my mail id ..
thank you...

Pankaj PandeyRank #642 · 3.7K reputationPosted Jul 23, 2013, 8:52 PM EDT
as
begin
update tablename
set salary= case
when salary< 5000 then salary * 1.1
else salary
end
end
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 23, 2013, 12:07 PM EDT
CREATE PROCEDURE hike
AS
BEGIN
UPDATE yourtablename
SET NetPay = CASE
WHEN Salary < 5000 THEN Salary * 1.1
ELSE Salary
END
END
Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 23, 2013, 7:00 PM EDT
I think this duplicate so please mark asd close
http://www.c-sharpcorner.com/Forums/Thread/220269/need-help-about-stored-procedure.aspx