skip to main
|
skip to sidebar
Code Tidbits
Generate row ID (T-SQL)
Let's assume we have all our data in a table MyTable, with a column named MyTableID, that we want to fill with unique consecutive values.
DECLARE @Index BIGINT
SET @Index = 0
UPDATE MyTable
SET @Index = MyTableID = @Index + 1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Labels
C#
(8)
IIS
(1)
T-SQL
(3)
No comments:
Post a Comment