CREATE TABLE [dbo].[TradeShow]
(
[TradeShowID] [int] NOT NULL IDENTITY(1, 1),
[OrdersFID] [int] NOT NULL,
[ShowCode] [varchar] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TradeShowName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BoothNumber] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Exhibitor] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OriginDestinationFlag] [smallint] NOT NULL,
[SequenceNumber] [int] NOT NULL,
[BoothDescription] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TradeShow] ADD CONSTRAINT [PK_TradeShow] PRIMARY KEY CLUSTERED ([TradeShowID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_TradeShow_OrdersFID] ON [dbo].[TradeShow] ([OrdersFID]) INCLUDE ([SequenceNumber], [ShowCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TradeShow] ADD CONSTRAINT [FK_TradeShow_Orders] FOREIGN KEY ([OrdersFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON [dbo].[TradeShow] TO [MssExec]
GRANT INSERT ON [dbo].[TradeShow] TO [MssExec]
GRANT DELETE ON [dbo].[TradeShow] TO [MssExec]
GRANT UPDATE ON [dbo].[TradeShow] TO [MssExec]
GO