Tables [dbo].[OutgoingEmailInvoiceAttachment]
Properties
PropertyValue
Row Count (~)0
Created7:39:53 PM Wednesday, February 28, 2024
Last Modified7:39:53 PM Wednesday, February 28, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_OutgoingEmailInvoiceAttachment: OutgoingEmailInvoiceAttachmentIdOutgoingEmailInvoiceAttachmentIdint4
No
1 - 1
Cluster Key IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_InvoicedHeaderFID: OutgoingEmailFID\InvoicedHeaderFIDForeign Keys FK_OutgoingEmailInvoiceAttachment_OutgoingEmail: [dbo].[OutgoingEmail].OutgoingEmailFIDIndexes IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_AttachmentOrder: OutgoingEmailFID\AttachmentOrderOutgoingEmailFIDint4
No
Cluster Key IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_InvoicedHeaderFID: OutgoingEmailFID\InvoicedHeaderFIDForeign Keys FK_OutgoingEmailInvoiceAttachment_InvoicedHeader: [dbo].[InvoicedHeader].InvoicedHeaderFIDInvoicedHeaderFIDint4
No
Indexes IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_AttachmentOrder: OutgoingEmailFID\AttachmentOrderAttachmentOrderint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_OutgoingEmailInvoiceAttachment: OutgoingEmailInvoiceAttachmentIdPK_OutgoingEmailInvoiceAttachmentOutgoingEmailInvoiceAttachmentId
Yes
IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_AttachmentOrderOutgoingEmailFID, AttachmentOrder
Yes
Cluster Key IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_InvoicedHeaderFID: OutgoingEmailFID\InvoicedHeaderFIDIX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_InvoicedHeaderFIDOutgoingEmailFID, InvoicedHeaderFID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_OutgoingEmailInvoiceAttachment_InvoicedHeaderCascadeInvoicedHeaderFID->[dbo].[InvoicedHeader].[IHPriKey]
FK_OutgoingEmailInvoiceAttachment_OutgoingEmailCascadeOutgoingEmailFID->[dbo].[OutgoingEmail].[OutgoingEmailID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[OutgoingEmailInvoiceAttachment]
(
[OutgoingEmailInvoiceAttachmentId] [int] NOT NULL IDENTITY(1, 1),
[OutgoingEmailFID] [int] NOT NULL,
[InvoicedHeaderFID] [int] NOT NULL,
[AttachmentOrder] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OutgoingEmailInvoiceAttachment] ADD CONSTRAINT [PK_OutgoingEmailInvoiceAttachment] PRIMARY KEY NONCLUSTERED  ([OutgoingEmailInvoiceAttachmentId]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_AttachmentOrder] ON [dbo].[OutgoingEmailInvoiceAttachment] ([OutgoingEmailFID], [AttachmentOrder]) ON [PRIMARY]
GO
CREATE UNIQUE CLUSTERED INDEX [IX_OutgoingEmailInvoiceAttachment_OutgoingEmailFID_InvoicedHeaderFID] ON [dbo].[OutgoingEmailInvoiceAttachment] ([OutgoingEmailFID], [InvoicedHeaderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OutgoingEmailInvoiceAttachment] ADD CONSTRAINT [FK_OutgoingEmailInvoiceAttachment_InvoicedHeader] FOREIGN KEY ([InvoicedHeaderFID]) REFERENCES [dbo].[InvoicedHeader] ([IHPriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[OutgoingEmailInvoiceAttachment] ADD CONSTRAINT [FK_OutgoingEmailInvoiceAttachment_OutgoingEmail] FOREIGN KEY ([OutgoingEmailFID]) REFERENCES [dbo].[OutgoingEmail] ([OutgoingEmailID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[OutgoingEmailInvoiceAttachment] TO [MssExec]
GRANT INSERT ON  [dbo].[OutgoingEmailInvoiceAttachment] TO [MssExec]
GRANT DELETE ON  [dbo].[OutgoingEmailInvoiceAttachment] TO [MssExec]
GRANT UPDATE ON  [dbo].[OutgoingEmailInvoiceAttachment] TO [MssExec]
GO
Uses
Used By