[dbo].[SakariAccountBranchMap]
CREATE TABLE [dbo].[SakariAccountBranchMap]
(
[SakariAccountBranchMapID] [int] NOT NULL IDENTITY(1, 1),
[SakariAccountFID] [int] NOT NULL,
[BranchFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariAccountBranchMap] ADD CONSTRAINT [PK_SakariAccountBranchMap] PRIMARY KEY NONCLUSTERED ([SakariAccountBranchMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariAccountBranchMap] ADD CONSTRAINT [IX_SakariAccountBranchMap_BranchFID] UNIQUE CLUSTERED ([BranchFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SakariAccountBranchMap] ADD CONSTRAINT [FK_SakariAccountBranchMap_Branch] FOREIGN KEY ([BranchFID]) REFERENCES [dbo].[Branch] ([BranchPriKey])
GO
ALTER TABLE [dbo].[SakariAccountBranchMap] ADD CONSTRAINT [FK_SakariAccountBranchMap_SakariAccount] FOREIGN KEY ([SakariAccountFID]) REFERENCES [dbo].[SakariAccount] ([SakariAccountID])
GO
GRANT SELECT ON [dbo].[SakariAccountBranchMap] TO [MssExec]
GRANT INSERT ON [dbo].[SakariAccountBranchMap] TO [MssExec]
GRANT DELETE ON [dbo].[SakariAccountBranchMap] TO [MssExec]
GRANT UPDATE ON [dbo].[SakariAccountBranchMap] TO [MssExec]
GO