[dbo].[LocServOrderLocationMap]
CREATE TABLE [dbo].[LocServOrderLocationMap]
(
[LocServOrderLocationMapID] [int] NOT NULL IDENTITY(1, 1),
[LocServFID] [int] NOT NULL,
[OrderLocationFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocServOrderLocationMap] ADD CONSTRAINT [PK_LocServOrderLocationMap] PRIMARY KEY CLUSTERED ([LocServOrderLocationMapID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_LocServOrderLocationMap_LocServFID_OrderLocationFID] ON [dbo].[LocServOrderLocationMap] ([LocServFID], [OrderLocationFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[LocServOrderLocationMap] ADD CONSTRAINT [FK_LocServOrderLocationMap_LocServ] FOREIGN KEY ([LocServFID]) REFERENCES [dbo].[LocServ] ([PriKey])
GO
ALTER TABLE [dbo].[LocServOrderLocationMap] ADD CONSTRAINT [FK_LocServOrderLocationMap_OrderLocation] FOREIGN KEY ([OrderLocationFID]) REFERENCES [dbo].[OrderLocations] ([OrderLocationID])
GO
GRANT SELECT ON [dbo].[LocServOrderLocationMap] TO [MssExec]
GRANT INSERT ON [dbo].[LocServOrderLocationMap] TO [MssExec]
GRANT DELETE ON [dbo].[LocServOrderLocationMap] TO [MssExec]
GRANT UPDATE ON [dbo].[LocServOrderLocationMap] TO [MssExec]
GO