Tables [dbo].[ReportLetter]
Properties
PropertyValue
HeapYes
Row Count (~)0
Created7:24:24 AM Friday, December 7, 2018
Last Modified7:41:26 PM Wednesday, February 28, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Primary Key PK_ReportLetter: ReportFIDForeign Keys FK_Reports: [dbo].[Reports].ReportFIDReportFIDint4
No
LetterContentvarbinary(max)max
No
CreatedOndatetime8
No
Foreign Keys FK_ReportLetter_SysUser: [dbo].[Sysuser].CreatedByCreatedByint4
No
LastEditeddatetime8
Yes
Foreign Keys FK_ReportLetter_SysUser2: [dbo].[Sysuser].LastEditedByLastEditedByint4
Yes
TimesUsedint4
No
((0))
Foreign Keys FK_ReportLetter_DocumentType: [dbo].[DocumentType].DocumentTypeFIDDocumentTypeFIDint4
No
Indexes Indexes
NameColumnsUnique
Primary Key PK_ReportLetter: ReportFIDPK_ReportLetterReportFID
Yes
Foreign Keys Foreign Keys
NameColumns
FK_ReportLetter_SysUserCreatedBy->[dbo].[Sysuser].[SysUserID]
FK_ReportLetter_DocumentTypeDocumentTypeFID->[dbo].[DocumentType].[DocumentTypeID]
FK_ReportLetter_SysUser2LastEditedBy->[dbo].[Sysuser].[SysUserID]
FK_ReportsReportFID->[dbo].[Reports].[Prikey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ReportLetter]
(
[ReportFID] [int] NOT NULL,
[LetterContent] [varbinary] (max) NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[CreatedBy] [int] NOT NULL,
[LastEdited] [datetime] NULL,
[LastEditedBy] [int] NULL,
[TimesUsed] [int] NOT NULL CONSTRAINT [DF_ReportLetter_TimesUsed] DEFAULT ((0)),
[DocumentTypeFID] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReportLetter] ADD CONSTRAINT [PK_ReportLetter] PRIMARY KEY NONCLUSTERED  ([ReportFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ReportLetter] ADD CONSTRAINT [FK_ReportLetter_SysUser] FOREIGN KEY ([CreatedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[ReportLetter] ADD CONSTRAINT [FK_ReportLetter_DocumentType] FOREIGN KEY ([DocumentTypeFID]) REFERENCES [dbo].[DocumentType] ([DocumentTypeID])
GO
ALTER TABLE [dbo].[ReportLetter] ADD CONSTRAINT [FK_ReportLetter_SysUser2] FOREIGN KEY ([LastEditedBy]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[ReportLetter] ADD CONSTRAINT [FK_Reports] FOREIGN KEY ([ReportFID]) REFERENCES [dbo].[Reports] ([Prikey])
GO
GRANT SELECT ON  [dbo].[ReportLetter] TO [MssExec]
GRANT INSERT ON  [dbo].[ReportLetter] TO [MssExec]
GRANT DELETE ON  [dbo].[ReportLetter] TO [MssExec]
GRANT UPDATE ON  [dbo].[ReportLetter] TO [MssExec]
GO
Uses