CREATE TABLE [dbo].[InvoiceCharges]
(
[InvoiceChargesID] [int] NOT NULL IDENTITY(1, 1),
[AddlChargesID] [int] NOT NULL,
[InvoiceNo] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[InvoiceDate] [datetime] NOT NULL,
[InvoiceSuppNo] [int] NOT NULL,
[InvoiceChargeAmount] [money] NOT NULL,
[OrdPriKey] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoiceCharges] ADD CONSTRAINT [PK_InvoiceCharges] PRIMARY KEY CLUSTERED ([InvoiceChargesID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InvoiceCharges] ADD CONSTRAINT [FK_InvoiceCharges_AddlCharges] FOREIGN KEY ([AddlChargesID]) REFERENCES [dbo].[AddlCharges] ([AddlChargesID])
GO
ALTER TABLE [dbo].[InvoiceCharges] ADD CONSTRAINT [FK_InvoiceCharges_ORDERS] FOREIGN KEY ([OrdPriKey]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON [dbo].[InvoiceCharges] TO [MssExec]
GRANT INSERT ON [dbo].[InvoiceCharges] TO [MssExec]
GRANT DELETE ON [dbo].[InvoiceCharges] TO [MssExec]
GRANT UPDATE ON [dbo].[InvoiceCharges] TO [MssExec]
GO