[dbo].[OutgoingEmailAddress]
CREATE TABLE [dbo].[OutgoingEmailAddress]
(
[OutgoingEmailAddressId] [int] NOT NULL IDENTITY(1, 1),
[OutgoingEmailFID] [int] NOT NULL,
[OutgoingEmailAddressTypeFID] [int] NOT NULL,
[Name] [nvarchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Address] [nvarchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OutgoingEmailAddress] ADD CONSTRAINT [PK_OutgoingEmailAddress] PRIMARY KEY CLUSTERED ([OutgoingEmailAddressTypeFID], [OutgoingEmailAddressId]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OutgoingEmailAddress_OutgoingEmailFID] ON [dbo].[OutgoingEmailAddress] ([OutgoingEmailFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[OutgoingEmailAddress] ADD CONSTRAINT [FK_OutgoingEmailAddress_OutgoingEmailAddressTypeFID] FOREIGN KEY ([OutgoingEmailAddressTypeFID]) REFERENCES [dbo].[OutgoingEmailAddressType] ([OutgoingEmailAddressTypeID])
GO
ALTER TABLE [dbo].[OutgoingEmailAddress] ADD CONSTRAINT [FK_OutgoingEmailAddress_OutgoingEmailFID] FOREIGN KEY ([OutgoingEmailFID]) REFERENCES [dbo].[OutgoingEmail] ([OutgoingEmailID]) ON DELETE CASCADE
GO
GRANT SELECT ON [dbo].[OutgoingEmailAddress] TO [MssExec]
GRANT INSERT ON [dbo].[OutgoingEmailAddress] TO [MssExec]
GRANT DELETE ON [dbo].[OutgoingEmailAddress] TO [MssExec]
GRANT UPDATE ON [dbo].[OutgoingEmailAddress] TO [MssExec]
GO