[dbo].[AdvanceProcessing]
CREATE TABLE [dbo].[AdvanceProcessing]
(
[AdvanceProcessingID] [int] NOT NULL IDENTITY(1, 1),
[SessionID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AdvanceFID] [int] NOT NULL,
[GeneratingDate] [datetime] NOT NULL,
[GeneratingBySysUserFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvanceProcessing] ADD CONSTRAINT [PK_AdvanceProcessing] PRIMARY KEY CLUSTERED ([AdvanceProcessingID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_AdvanceProcessing_AdvanceFID] ON [dbo].[AdvanceProcessing] ([AdvanceFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AdvanceProcessing_GeneratingBySysUserFID] ON [dbo].[AdvanceProcessing] ([GeneratingBySysUserFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AdvanceProcessing] ADD CONSTRAINT [FK_AdvanceProcessing_Advance] FOREIGN KEY ([AdvanceFID]) REFERENCES [dbo].[Advance] ([PriKey])
GO
ALTER TABLE [dbo].[AdvanceProcessing] ADD CONSTRAINT [FK_AdvanceProcessing_GeneratingBySysUserFID] FOREIGN KEY ([GeneratingBySysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[AdvanceProcessing] TO [MssExec]
GRANT INSERT ON [dbo].[AdvanceProcessing] TO [MssExec]
GRANT DELETE ON [dbo].[AdvanceProcessing] TO [MssExec]
GRANT UPDATE ON [dbo].[AdvanceProcessing] TO [MssExec]
GO