/* Run this script on SQL Server 2008 or later. There may be flaws if running on earlier versions of SQL Server. */ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SystemAttributes]') AND type in (N'U')) DROP TABLE [dbo].[SystemAttributes] GO CREATE TABLE [dbo].[SystemAttributes] ( [Id] [uniqueidentifier] NOT NULL CONSTRAINT [DF_SystemAttributes_Id] DEFAULT (newid()), [Name] [nvarchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [Type] [int] NOT NULL, CONSTRAINT [PK_SystemAttributesID] PRIMARY KEY CLUSTERED ([Id]) ) ON [PRIMARY] GO