[dbo].[InternationalBOLConsignee]
CREATE TABLE [dbo].[InternationalBOLConsignee]
(
[InternationalBOLConsigneeID] [int] NOT NULL IDENTITY(1, 1),
[InternationalBOLConsigneeTypeFID] [int] NOT NULL,
[OrdersFID] [int] NOT NULL,
[AgentFID] [int] NULL,
[VendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Contact] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBOLConsignee] ADD CONSTRAINT [PK_InternationalBOLConsignee] PRIMARY KEY CLUSTERED ([InternationalBOLConsigneeID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBOLConsignee] ADD CONSTRAINT [IX_InternationalBOLConsignee_Orders] UNIQUE NONCLUSTERED ([OrdersFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBOLConsignee] ADD CONSTRAINT [FK_InternationalBOLConsignee_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey])
GO
ALTER TABLE [dbo].[InternationalBOLConsignee] ADD CONSTRAINT [FK_InternationalBOLConsignee_InternationalBOLConsigneeType] FOREIGN KEY ([InternationalBOLConsigneeTypeFID]) REFERENCES [dbo].[InternationalBOLConsigneeType] ([InternationalBOLConsigneeTypeID])
GO
ALTER TABLE [dbo].[InternationalBOLConsignee] ADD CONSTRAINT [FK_InternationalBOLConsignee_Orders] FOREIGN KEY ([OrdersFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON [dbo].[InternationalBOLConsignee] TO [MssExec]
GRANT INSERT ON [dbo].[InternationalBOLConsignee] TO [MssExec]
GRANT DELETE ON [dbo].[InternationalBOLConsignee] TO [MssExec]
GRANT UPDATE ON [dbo].[InternationalBOLConsignee] TO [MssExec]
GO