CREATE TABLE [dbo].[State]
(
[StateID] [int] NOT NULL IDENTITY(1, 1),
[Code] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[State] ADD CONSTRAINT [PK_State] PRIMARY KEY NONCLUSTERED ([StateID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[State] ADD CONSTRAINT [IX_State_CodeName] UNIQUE NONCLUSTERED ([Code], [Name]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_State_Code] ON [dbo].[State] ([Code]) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[State] TO [MssExec]
GRANT INSERT ON [dbo].[State] TO [MssExec]
GRANT DELETE ON [dbo].[State] TO [MssExec]
GRANT UPDATE ON [dbo].[State] TO [MssExec]
GO