update semi-incremental column  [ 30 views ]

To add incremental numbers into a column (not an auto increment column) is easy with a stored procedure but we can use a simple update also.

DECLARE @counter int
SET @counter = 0

UPDATE [TABLE_NAME] 
SET @counter = [COLUMN_NAME] = @counter + 1

done.

#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }