CREATE TABLE [dbo].[RPUserReportParams]
(
[UserReportParamID] [int] NOT NULL IDENTITY(1, 1),
[ReportParamID] [int] NULL,
[UserReportID] [int] NULL,
[Value] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RPUserReportParams] ADD CONSTRAINT [PK_RPUserReportParams] PRIMARY KEY CLUSTERED ([UserReportParamID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RPUserReportParams] ADD CONSTRAINT [FK_RPUserReportParams_ReportParamID_RPReportParams] FOREIGN KEY ([ReportParamID]) REFERENCES [dbo].[RPReportParams] ([ReportParamID])
GO
ALTER TABLE [dbo].[RPUserReportParams] ADD CONSTRAINT [FK_RPUserReportParams_UserReportID_RPUserReports] FOREIGN KEY ([UserReportID]) REFERENCES [dbo].[RPUserReports] ([UserReportID])
GO