SQl-Update Query



Update Query.


if we want to update all the records starting from the 9 Th or a particular record by incrementing it by 1.The Example shown below explains how 9th record will be the 10th and 10th will be the 11 th and so on.

DECLARE @counter int
SET @counter =9


UPDATE Table Name
SET  Columnname= Columnname+ 1 where Columnname >=@counter

HappyCoding ! 😉

Advertisements

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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: