[dbo].[RevenueRatingImportDetailReduction]
CREATE TABLE [dbo].[RevenueRatingImportDetailReduction]
(
[RevenueRatingImportDetailReductionID] [int] NOT NULL IDENTITY(1, 1),
[RevenueRatingImportDetailFID] [int] NOT NULL,
[ReductionTypeFID] [int] NOT NULL,
[ReductionBasisFID] [int] NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Percentage] [decimal] (10, 3) NULL,
[ReductionAmount] [money] NOT NULL CONSTRAINT [DF_RevenueRatingImportDetailReduction_ReductionAmount] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportDetailReduction] ADD CONSTRAINT [PK_RevenueRatingImportDetailReduction] PRIMARY KEY NONCLUSTERED ([RevenueRatingImportDetailReductionID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_Clustered_RevenueRatingImportDetailReduction_RevenueRatingImportDetailFID] ON [dbo].[RevenueRatingImportDetailReduction] ([RevenueRatingImportDetailFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_RevenueRatingImportDetailReduction_RevenueRatingImportDetailFID] ON [dbo].[RevenueRatingImportDetailReduction] ([RevenueRatingImportDetailFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RevenueRatingImportDetailReduction] ADD CONSTRAINT [FK_RevenueRatingImportDetailReduction_ReductionBasis] FOREIGN KEY ([ReductionBasisFID]) REFERENCES [dbo].[ReductionBasis] ([ReductionBasisID])
GO
ALTER TABLE [dbo].[RevenueRatingImportDetailReduction] ADD CONSTRAINT [FK_RevenueRatingImportDetailReduction_ReductionType] FOREIGN KEY ([ReductionTypeFID]) REFERENCES [dbo].[ReductionType] ([ReductionTypeID])
GO
ALTER TABLE [dbo].[RevenueRatingImportDetailReduction] ADD CONSTRAINT [FK_RevenueRatingImportDetailReduction_RevenueRatingImportDetail] FOREIGN KEY ([RevenueRatingImportDetailFID]) REFERENCES [dbo].[RevenueRatingImportDetail] ([RevenueRatingImportDetailID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[RevenueRatingImportDetailReduction] TO [MssExec]
GRANT INSERT ON [dbo].[RevenueRatingImportDetailReduction] TO [MssExec]
GRANT DELETE ON [dbo].[RevenueRatingImportDetailReduction] TO [MssExec]
GRANT UPDATE ON [dbo].[RevenueRatingImportDetailReduction] TO [MssExec]
GO