CREATE TABLE [dbo].[ProductCode]
(
[ProductCodeID] [int] NOT NULL IDENTITY(1, 1),
[Code] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ProductCode] ADD CONSTRAINT [PK_ProductCode] PRIMARY KEY NONCLUSTERED ([ProductCodeID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ProductCode] ADD CONSTRAINT [IX_ProductCode_Code] UNIQUE NONCLUSTERED ([Code]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[ProductCode] TO [MssExec]
GRANT INSERT ON [dbo].[ProductCode] TO [MssExec]
GRANT DELETE ON [dbo].[ProductCode] TO [MssExec]
GRANT UPDATE ON [dbo].[ProductCode] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Type of Product.', 'SCHEMA', N'dbo', 'TABLE', N'ProductCode', 'COLUMN', N'Code'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'ProductCode', 'COLUMN', N'ProductCodeID'
GO