CREATE TABLE [dbo].[RateTypes]
(
[RTypePriKey] [int] NOT NULL IDENTITY(1, 1),
[RTDescription] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[QuantityOneDescription] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[QuantityTwoDescription] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Divisor] [decimal] (12, 2) NOT NULL CONSTRAINT [DF_RateTypes_Divisor] DEFAULT ((1.0)),
[QuantityOneInvoiceLabel] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[QuantityTwoInvoiceLabel] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ApplyLaborRatingType] [bit] NOT NULL CONSTRAINT [DF_RateTypes_ApplyLaborRatingType] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateTypes] ADD CONSTRAINT [CK_RateTypes_Divisor] CHECK (([Divisor]>(0)))
GO
ALTER TABLE [dbo].[RateTypes] ADD CONSTRAINT [PK_RateTypes] PRIMARY KEY CLUSTERED ([RTypePriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[RateTypes] TO [MssExec]
GRANT INSERT ON [dbo].[RateTypes] TO [MssExec]
GRANT DELETE ON [dbo].[RateTypes] TO [MssExec]
GRANT UPDATE ON [dbo].[RateTypes] TO [MssExec]
GO