CREATE TABLE [dbo].[RateMatrix]
(
[RateMatrixID] [int] NOT NULL IDENTITY(1, 1),
[Description] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[RateMatrixRangeTypeXFID] [int] NOT NULL,
[RateMatrixRangeTypeYFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateMatrix] ADD CONSTRAINT [PK_RateMatrix] PRIMARY KEY CLUSTERED ([RateMatrixID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateMatrix] ADD CONSTRAINT [IX_RateMatrix_Description] UNIQUE NONCLUSTERED ([Description]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RateMatrix] ADD CONSTRAINT [FK_RateMatrix_RateMatrixRangeTypeX] FOREIGN KEY ([RateMatrixRangeTypeXFID]) REFERENCES [dbo].[RateMatrixRangeType] ([RateMatrixRangeTypeID])
GO
ALTER TABLE [dbo].[RateMatrix] ADD CONSTRAINT [FK_RateMatrix_RateMatrixRangeTypeY] FOREIGN KEY ([RateMatrixRangeTypeYFID]) REFERENCES [dbo].[RateMatrixRangeType] ([RateMatrixRangeTypeID])
GO
GRANT SELECT ON [dbo].[RateMatrix] TO [MssExec]
GRANT INSERT ON [dbo].[RateMatrix] TO [MssExec]
GRANT DELETE ON [dbo].[RateMatrix] TO [MssExec]
GRANT UPDATE ON [dbo].[RateMatrix] TO [MssExec]
GO