Here's a handy sql snippet from my archives. This allows us to populate a database column with an incrementing value. I found this useful when I was forced to manually migrate a bunch a historical data from a weird proprietary system a couple of years ago.
What I find interesting about this snippet is how it simply demonstrates chaining of variable assignment as part of an update operation.
DECLARE @id INT
SET @id = 0
SET @id = id = @id + 1