To assign the Row Guid a default value of NewID() you need to set that up in the following manner:
Note: RowGuid is valid only for datatype uniqueidentifier.
Below is sample script: Save the below script as Test.sql format and perform Reverse Engineer from script into a SQL Server model.
CREATE TABLE cust2
(
CustomerID2 uniqueidentifier ROWGUIDCOL NOT NULL
DEFAULT newid(),
Company2 varchar(30) NOT NULL
)
go
We have attached a sample model testguid.erwin with the RowGuid in it.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center