Tables [dbo].[FactoringBatchDetail]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created7:28:27 PM Tuesday, September 24, 2024
Last Modified7:28:31 PM Tuesday, September 24, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_FactoringBatchDetail: FactoringBatchDetailIDFactoringBatchDetailIDint4
No
1 - 1
Foreign Keys FK_FactoringBatch_FactoringBatch: [dbo].[FactoringBatch].FactoringBatchFIDIndexes IX_FactoringBatchDetail_Batch_Invoice: FactoringBatchFID\InvoicedHeaderFIDFactoringBatchFIDint4
No
Foreign Keys FK_FactoringBatch_InvoicedHeader: [dbo].[InvoicedHeader].InvoicedHeaderFIDIndexes IX_FactoringBatchDetail_Batch_Invoice: FactoringBatchFID\InvoicedHeaderFIDInvoicedHeaderFIDint4
No
InvoiceAmountmoney8
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_FactoringBatchDetail: FactoringBatchDetailIDPK_FactoringBatchDetailFactoringBatchDetailID
Yes
IX_FactoringBatchDetail_Batch_InvoiceFactoringBatchFID, InvoicedHeaderFID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_FactoringBatch_FactoringBatchCascadeFactoringBatchFID->[dbo].[FactoringBatch].[FactoringBatchID]
FK_FactoringBatch_InvoicedHeaderInvoicedHeaderFID->[dbo].[InvoicedHeader].[IHPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[FactoringBatchDetail]
(
[FactoringBatchDetailID] [int] NOT NULL IDENTITY(1, 1),
[FactoringBatchFID] [int] NOT NULL,
[InvoicedHeaderFID] [int] NOT NULL,
[InvoiceAmount] [money] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[FactoringBatchDetail] ADD CONSTRAINT [PK_FactoringBatchDetail] PRIMARY KEY NONCLUSTERED  ([FactoringBatchDetailID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[FactoringBatchDetail] ADD CONSTRAINT [IX_FactoringBatchDetail_Batch_Invoice] UNIQUE NONCLUSTERED  ([FactoringBatchFID], [InvoicedHeaderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[FactoringBatchDetail] ADD CONSTRAINT [FK_FactoringBatch_FactoringBatch] FOREIGN KEY ([FactoringBatchFID]) REFERENCES [dbo].[FactoringBatch] ([FactoringBatchID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[FactoringBatchDetail] ADD CONSTRAINT [FK_FactoringBatch_InvoicedHeader] FOREIGN KEY ([InvoicedHeaderFID]) REFERENCES [dbo].[InvoicedHeader] ([IHPriKey])
GO
GRANT SELECT ON  [dbo].[FactoringBatchDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[FactoringBatchDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[FactoringBatchDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[FactoringBatchDetail] TO [MssExec]
GO
Uses