CREATE TABLE [dbo].[ServiceType]
(
[ServiceTypeID] [int] NOT NULL IDENTITY(1, 1),
[ServiceTypeDescription] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VanLineCode] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ServiceType] ADD CONSTRAINT [PK_ServiceType] PRIMARY KEY CLUSTERED ([ServiceTypeID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ServiceType] ADD CONSTRAINT [IX_Unique_ServiceTypeDescription_VanLineCode] UNIQUE NONCLUSTERED ([ServiceTypeDescription], [VanLineCode]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ServiceTypeDescription] ON [dbo].[ServiceType] ([ServiceTypeID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[ServiceType] TO [MssExec]
GRANT INSERT ON [dbo].[ServiceType] TO [MssExec]
GRANT DELETE ON [dbo].[ServiceType] TO [MssExec]
GRANT UPDATE ON [dbo].[ServiceType] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'The description of the service type.', 'SCHEMA', N'dbo', 'TABLE', N'ServiceType', 'COLUMN', N'ServiceTypeDescription'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'ServiceType', 'COLUMN', N'ServiceTypeID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The van line code for the service type.', 'SCHEMA', N'dbo', 'TABLE', N'ServiceType', 'COLUMN', N'VanLineCode'
GO