Creating update stored procedure….!

Hi All this is code for the stored procedure for updation…. ENJOY
First you have to declare the variable which recieve values with @ sign…… and for a variable which does not recieve value but get value from within the stored procedure, the keyword is DECLARE
so here’s the code this code needs 4 parameters which needs to be sent with the query…. and one is calculated one….

@ProjectCode varchar(50),





@ChangerIndex varchar(50)


DECLARE @OldProjectID int

SELECT @OldProjectID = ProjectID FROM TblProjects WHERE ProjectCode=@ChangerIndex

UPDATE tblprojects

SET ProjectName=@ProjectName,


WHERE ProjectID=@OldProjectID


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: