Tables [dbo].[OutgoingEmailFileAttachment]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created8:51:25 AM Thursday, December 5, 2024
Last Modified8:51:25 AM Thursday, December 5, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_OutgoingEmailFileAttachment: OutgoingEmailFileAttachmentIdOutgoingEmailFileAttachmentIdint4
No
1 - 1
Cluster Key IX_OutgoingEmailFileAttachment_OutgoingEmailFID_AttachmentOrder: OutgoingEmailFID\AttachmentOrderForeign Keys FK_OutgoingEmailFileAttachment_OutgoingEmail: [dbo].[OutgoingEmail].OutgoingEmailFIDOutgoingEmailFIDint4
No
Contentvarbinary(max)max
No
FileNamenvarchar(128)256
No
Cluster Key IX_OutgoingEmailFileAttachment_OutgoingEmailFID_AttachmentOrder: OutgoingEmailFID\AttachmentOrderAttachmentOrderint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_OutgoingEmailFileAttachment: OutgoingEmailFileAttachmentIdPK_OutgoingEmailFileAttachmentOutgoingEmailFileAttachmentId
Yes
Cluster Key IX_OutgoingEmailFileAttachment_OutgoingEmailFID_AttachmentOrder: OutgoingEmailFID\AttachmentOrderIX_OutgoingEmailFileAttachment_OutgoingEmailFID_AttachmentOrderOutgoingEmailFID, AttachmentOrder
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_OutgoingEmailFileAttachment_OutgoingEmailCascadeOutgoingEmailFID->[dbo].[OutgoingEmail].[OutgoingEmailID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[OutgoingEmailFileAttachment]
(
[OutgoingEmailFileAttachmentId] [int] NOT NULL IDENTITY(1, 1),
[OutgoingEmailFID] [int] NOT NULL,
[Content] [varbinary] (max) NOT NULL,
[FileName] [nvarchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AttachmentOrder] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[OutgoingEmailFileAttachment] ADD CONSTRAINT [PK_OutgoingEmailFileAttachment] PRIMARY KEY NONCLUSTERED  ([OutgoingEmailFileAttachmentId]) ON [PRIMARY]
GO
CREATE UNIQUE CLUSTERED INDEX [IX_OutgoingEmailFileAttachment_OutgoingEmailFID_AttachmentOrder] ON [dbo].[OutgoingEmailFileAttachment] ([OutgoingEmailFID], [AttachmentOrder]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OutgoingEmailFileAttachment] ADD CONSTRAINT [FK_OutgoingEmailFileAttachment_OutgoingEmail] FOREIGN KEY ([OutgoingEmailFID]) REFERENCES [dbo].[OutgoingEmail] ([OutgoingEmailID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[OutgoingEmailFileAttachment] TO [MssExec]
GRANT INSERT ON  [dbo].[OutgoingEmailFileAttachment] TO [MssExec]
GRANT DELETE ON  [dbo].[OutgoingEmailFileAttachment] TO [MssExec]
GRANT UPDATE ON  [dbo].[OutgoingEmailFileAttachment] TO [MssExec]
GO
Uses
Used By