Adding newsequentialid() to Default Value in SQL Server Management Studio

This is apparently a really well known issue with SQL Server Management Studio. When you try to add “newsequentialid()” to the “Default Value or Binding” field in the designer it keeps throwing the error “Error validating the default for column ”. Do you want to cancel your changes?”. The method I found to work around this is shown below using T-SQL instead of the designer UI.

ALTER TABLE dbo.TableName ADD CONSTRAINT DF_ColumnName DEFAULT newsequentialid() FOR ColumnName
Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s