
[dbo].[ARCCustomerContact]
CREATE TABLE [dbo].[ARCCustomerContact]
(
[ARCCustomerContactId] [int] NOT NULL IDENTITY(1, 1),
[AccountingCustomerFid] [int] NULL,
[ContactPerson] [nvarchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EmailAddress] [nvarchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCCustomerContact] ADD CONSTRAINT [PK_ARCCustomerContact] PRIMARY KEY NONCLUSTERED ([ARCCustomerContactId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCCustomerContact] ADD CONSTRAINT [IX_ARCCustomerContact_CustomerNumber] UNIQUE NONCLUSTERED ([AccountingCustomerFid], [ARCCustomerContactId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ARCCustomerContact] ADD CONSTRAINT [FK_ARCCustomerContact_AccountingCustomerFid] FOREIGN KEY ([AccountingCustomerFid]) REFERENCES [dbo].[AccountingCustomer] ([AccountingCustomerId])
GO
GRANT SELECT ON [dbo].[ARCCustomerContact] TO [MssExec]
GRANT INSERT ON [dbo].[ARCCustomerContact] TO [MssExec]
GRANT DELETE ON [dbo].[ARCCustomerContact] TO [MssExec]
GRANT UPDATE ON [dbo].[ARCCustomerContact] TO [MssExec]
GO