CREATE TABLE [dbo].[AutoClass]
(
[AutoClassID] [int] NOT NULL IDENTITY(1, 1),
[AutoClassDescription] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VanLineCode] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[OverSizeFlag] [bit] NOT NULL CONSTRAINT [DF_AutoClass_OverSizeFlag] DEFAULT (0)
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AutoClass] ADD CONSTRAINT [PK_AutoClass] PRIMARY KEY CLUSTERED ([AutoClassID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AutoClass] ADD CONSTRAINT [IX_Unique_AutoClass_VanLineCode] UNIQUE NONCLUSTERED ([AutoClassDescription], [VanLineCode]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AutoClassDescription] ON [dbo].[AutoClass] ([AutoClassID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[AutoClass] TO [MssExec]
GRANT INSERT ON [dbo].[AutoClass] TO [MssExec]
GRANT DELETE ON [dbo].[AutoClass] TO [MssExec]
GRANT UPDATE ON [dbo].[AutoClass] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The description of the auto class.', 'SCHEMA', N'dbo', 'TABLE', N'AutoClass', 'COLUMN', N'AutoClassDescription'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'AutoClass', 'COLUMN', N'AutoClassID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Flag indicating if the auto class is oversized. 1 for true, 0 for false.', 'SCHEMA', N'dbo', 'TABLE', N'AutoClass', 'COLUMN', N'OverSizeFlag'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The van line code for the auto class.', 'SCHEMA', N'dbo', 'TABLE', N'AutoClass', 'COLUMN', N'VanLineCode'
GO