
[dbo].[CustomerStatementRunBranches]
CREATE TABLE [dbo].[CustomerStatementRunBranches]
(
[CustomerStatementRunBranchesID] [int] NOT NULL IDENTITY(1, 1),
[CustomerStatementRunFID] [int] NOT NULL,
[BranchID] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[BranchName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRunBranches] ADD CONSTRAINT [PK_CustomerStatementRunBranches] PRIMARY KEY NONCLUSTERED ([CustomerStatementRunBranchesID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRunBranches] ADD CONSTRAINT [IX_CustomerStatementRunBranches_BranchID] UNIQUE CLUSTERED ([CustomerStatementRunFID], [BranchID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CustomerStatementRunBranches] ADD CONSTRAINT [FK_CustomerStatementRunBranches_CustomerStatementRun] FOREIGN KEY ([CustomerStatementRunFID]) REFERENCES [dbo].[CustomerStatementRun] ([CustomerStatementRunID])
GO
GRANT SELECT ON [dbo].[CustomerStatementRunBranches] TO [MssExec]
GRANT INSERT ON [dbo].[CustomerStatementRunBranches] TO [MssExec]
GRANT DELETE ON [dbo].[CustomerStatementRunBranches] TO [MssExec]
GRANT UPDATE ON [dbo].[CustomerStatementRunBranches] TO [MssExec]
GO