[dbo].[QuoteLocalServiceMap]
CREATE TABLE [dbo].[QuoteLocalServiceMap]
(
[QuoteLocalServiceMapID] [int] NOT NULL IDENTITY(1, 1),
[QuoteHeaderFID] [int] NOT NULL,
[LocServFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteLocalServiceMap] ADD CONSTRAINT [PK_QuoteLocalServiceMap] PRIMARY KEY NONCLUSTERED ([QuoteLocalServiceMapID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteLocalServiceMap] ADD CONSTRAINT [IX_QuoteLocalServiceMap_OnlyOneHeaderService] UNIQUE NONCLUSTERED ([QuoteHeaderFID], [LocServFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[QuoteLocalServiceMap] ADD CONSTRAINT [FK_QuoteLocalServiceMap_LocServ] FOREIGN KEY ([LocServFID]) REFERENCES [dbo].[LocServ] ([PriKey])
GO
ALTER TABLE [dbo].[QuoteLocalServiceMap] ADD CONSTRAINT [FK_QuoteLocalServiceMap_QuoteHeader] FOREIGN KEY ([QuoteHeaderFID]) REFERENCES [dbo].[QuoteHeader] ([QuoteHeaderID])
GO
GRANT SELECT ON [dbo].[QuoteLocalServiceMap] TO [MssExec]
GRANT INSERT ON [dbo].[QuoteLocalServiceMap] TO [MssExec]
GRANT DELETE ON [dbo].[QuoteLocalServiceMap] TO [MssExec]
GRANT UPDATE ON [dbo].[QuoteLocalServiceMap] TO [MssExec]
GO