[dbo].[RecentlyUsedEmailAddress]
CREATE TABLE [dbo].[RecentlyUsedEmailAddress]
(
[RecentlyUsedEmailId] [int] NOT NULL IDENTITY(1, 1),
[SenderSysUserFid] [int] NOT NULL,
[RecipientName] [nvarchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EmailAddress] [nvarchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[LastUsedOn] [datetimeoffset] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RecentlyUsedEmailAddress] ADD CONSTRAINT [PK_RecentlyUsedEmailAddress] PRIMARY KEY NONCLUSTERED ([RecentlyUsedEmailId]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_RecentlyUsedEmailAddress_SysUserId_EmailAddress] ON [dbo].[RecentlyUsedEmailAddress] ([SenderSysUserFid], [EmailAddress]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RecentlyUsedEmailAddress] ADD CONSTRAINT [FK_RecentlyUsedEmailAddress] FOREIGN KEY ([SenderSysUserFid]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON [dbo].[RecentlyUsedEmailAddress] TO [MssExec]
GRANT INSERT ON [dbo].[RecentlyUsedEmailAddress] TO [MssExec]
GRANT DELETE ON [dbo].[RecentlyUsedEmailAddress] TO [MssExec]
GRANT UPDATE ON [dbo].[RecentlyUsedEmailAddress] TO [MssExec]
GO