Technical Article

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!

(2)

You rated this post out of 5. Change rating

2006-03-28 (first published: )

2,063 reads

Blogs

PowerPoint to HTML with Claude AI

By

I had an idea for an animated view of a sales tool, and started...

Don’t Miss Out – SQL Server Query Tuning Fundamentals Starts Next Monday!

By

Next Monday, February 9, 2026, my one-day live online training SQL Server Query Tuning...

Monday Monitor Tips: SQL Auditing Preview

By

One of the features we advocates have been advocating for is a better way...

Read the latest Blogs

Forums

Delta Lake: The Definitive Guide: Modern Data Lakehouse Architectures with Data Lakes

By Site Owners

Comments posted to this topic are about the item Delta Lake: The Definitive Guide:...

Databricks Data Intelligence Platform: Unlocking the GenAI Revolution

By Site Owners

Comments posted to this topic are about the item Databricks Data Intelligence Platform: Unlocking...

Storytelling with Data: Let's Practice!

By Site Owners

Comments posted to this topic are about the item Storytelling with Data: Let's Practice!

Visit the forum

Question of the Day

The Decoded Value

In SQL Server 2025, what is returned from this code:

DECLARE @message VARCHAR(50) = 'Hello SQL Server 2025!';
DECLARE @encoded VARCHAR(MAX);

SET @encoded = BASE64_ENCODE(CAST(@message AS VARBINARY(1000)));
SELECT BASE64_DECODE(@encoded) 

See possible answers