Update a table column with sequence number

Assume that you already have a table with 1000 rows. Now suppose, after some months, you feel a need to insert a sequence number column in the same table. Here is a script that I have worked out. If you have anyother better way then you are most welcome to comment on the same!

4 (2)

2006-03-28 (first published: )

1,030 reads

Blogs

The First Data Saturday is Tomorrow

By

Data Saturday #2 – Guatemala is tomorrow. This is the first event on the...

Daily Coping 22 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Daily Coping 21 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Need to strip off the beginning of a field in SELECT statement

By tim8w

I have this table that unfortunately has spaces in the field, which I am...

Aliasing an instance name for remote connections

By Brandie Tarvin

It's been a long time since I set up a 2012 server. We have...

Looking for tips on Optimizing

By Mr. Brian Gale

I am probably going about this the wrong way, but my current solution is...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Amend a Commit

See possible answers