[dbo].[ClaimSettlementItem]
CREATE TABLE [dbo].[ClaimSettlementItem]
(
[ClaimSettlementItemID] [int] NOT NULL IDENTITY(1, 1),
[ClaimSettlementFID] [int] NOT NULL,
[ClaimItemFID] [int] NOT NULL,
[Amount] [money] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ClaimSettlementItem] ADD CONSTRAINT [PK_ClaimSettlementItem] PRIMARY KEY NONCLUSTERED ([ClaimSettlementItemID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ClaimSettlementItem_ClaimItem] ON [dbo].[ClaimSettlementItem] ([ClaimItemFID], [ClaimSettlementFID]) INCLUDE ([Amount], [ClaimSettlementItemID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE STATISTICS [STATS_ClaimSettlementItem] ON [dbo].[ClaimSettlementItem] ([ClaimItemFID], [ClaimSettlementFID])
GO
ALTER TABLE [dbo].[ClaimSettlementItem] ADD CONSTRAINT [FK_ClaimSettlementItem_ClaimItem] FOREIGN KEY ([ClaimItemFID]) REFERENCES [dbo].[ClaimItem] ([ClaimItemID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ClaimSettlementItem] ADD CONSTRAINT [FK_ClaimSettlementItem_Settlement] FOREIGN KEY ([ClaimSettlementFID]) REFERENCES [dbo].[ClaimSettlement] ([ClaimSettlementID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[ClaimSettlementItem] TO [MssExec]
GRANT INSERT ON [dbo].[ClaimSettlementItem] TO [MssExec]
GRANT DELETE ON [dbo].[ClaimSettlementItem] TO [MssExec]
GRANT UPDATE ON [dbo].[ClaimSettlementItem] TO [MssExec]
GO