CREATE TABLE [dbo].[SystemEmail]
(
[SystemEmailID] [int] NOT NULL IDENTITY(1, 1),
[SystemEmailTypeFID] [int] NOT NULL,
[Subject] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[BodyText] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UsageNote] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[HyperLinkText] [nvarchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ValidTags] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[SystemEmail] ADD CONSTRAINT [PK_SystemEmail] PRIMARY KEY NONCLUSTERED ([SystemEmailID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SystemEmail] ADD CONSTRAINT [IX_SystemEmail_SystemEmailTypeFID] UNIQUE NONCLUSTERED ([SystemEmailTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SystemEmail] ADD CONSTRAINT [FK_SystemEmail_SystemEmailType] FOREIGN KEY ([SystemEmailTypeFID]) REFERENCES [dbo].[SystemEmailType] ([SystemEmailTypeID])
GO
GRANT SELECT ON [dbo].[SystemEmail] TO [MssExec]
GRANT INSERT ON [dbo].[SystemEmail] TO [MssExec]
GRANT DELETE ON [dbo].[SystemEmail] TO [MssExec]
GRANT UPDATE ON [dbo].[SystemEmail] TO [MssExec]
GO