Reputation: 82186
question concerning SQL Server:
I have added a column with type uid to a table with already existing data.
How can I insert a guid in each row of this existing table?
(I mean without reading out the data with a dataadapter, adding a guid for each row and the updating the table [unless there is a method to automatically generate the update command])
Upvotes: 1
Views: 750
Reputation: 40182
Do it in SQL by running a query against your database. You could use SQL Server Management Studio.
UPDATE table_name
SET column_name = newid()
Upvotes: 4