Discussion in 'Performance Tuning for SQL Server Replication' started by nilayt, Nov 1, 2003.
Can someone provide me script to add this column in a table?
Use ALTER TABLE... statement to add uniqueidentifierand set NOT FOR REPLICATION option to the IDENTITY column.
This script should be ok?
Alter table [dbo].[Client] add rowguid uniqueidentifier ROWGUIDCOL default newid() not null
UPDATE [dbo].[Client] SET [rowguid] = DEFAULT
yep looks right to me, you won't need the update since the alter table already has a default
Yes, and you can check it yourself by parsing the query using QA (just in case).
I think I forgot here that we need to put index on that column.
yep you will need a unique index on the column...
create unique index iux_client_rowguid on dbo.client ( rowguid )
Separate names with a comma.