[dbo].[AdvanceFromCommission]
CREATE TABLE [dbo].[AdvanceFromCommission]
(
[AdvanceFromCommissionID] [int] NOT NULL IDENTITY(1, 1),
[AdvanceFID] [int] NULL,
[CommStmtVendorFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvanceFromCommission] ADD CONSTRAINT [PK_AdvanceFromCommission] PRIMARY KEY CLUSTERED ([AdvanceFromCommissionID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvanceFromCommission] ADD CONSTRAINT [FK_AdvanceFromCommission_Advance] FOREIGN KEY ([AdvanceFID]) REFERENCES [dbo].[Advance] ([PriKey])
GO
ALTER TABLE [dbo].[AdvanceFromCommission] ADD CONSTRAINT [FK_AdvanceFromCommission_CommStmtVendor] FOREIGN KEY ([CommStmtVendorFID]) REFERENCES [dbo].[CommStmtVendor] ([MSID])
GO
GRANT SELECT ON [dbo].[AdvanceFromCommission] TO [MssExec]
GRANT INSERT ON [dbo].[AdvanceFromCommission] TO [MssExec]
GRANT DELETE ON [dbo].[AdvanceFromCommission] TO [MssExec]
GRANT UPDATE ON [dbo].[AdvanceFromCommission] TO [MssExec]
GO