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,050 reads

Blogs

Goal Progress–Feb 2021

By

I set goals at the beginning of the year, and I’m tracking my progress...

How to: exec sp_help on temp tables?

By

Say you have a temp table and you want to see the columns names. For...

Daily Coping 26 Feb 2021

By

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

Read the latest Blogs

Forums

Question about deadlock

By sqlenthu 89358

Hello DBAs, I am facing some deadlock issue and after investigation from trace flag...

Get Date Based on TimeOffSet and Day

By Rock

Team I have a table which carries the below columns and values TimeOffSet >...

MSDTC and Always On AG

By VastSQL

Hi Experts, We are planning to implement 2 Node AO SQL Server 2019. For...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers