Tables [dbo].[ToDoNote]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created11:10:57 AM Monday, August 19, 2013
Last Modified3:46:25 PM Tuesday, November 18, 2014
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_ToDoNote: ToDoNoteIDToDoNoteIDint4
No
1 - 1
Foreign Keys FK_ToDoNote_ToDo: [dbo].[ToDo].ToDoFIDIndexes IX_ToDoNote_ToDoFID: ToDoFIDToDoFIDint4
No
Foreign Keys FK_ToDoNote_Sysuser: [dbo].[Sysuser].ChangedBySysuserFIDIndexes IX_ToDoNote_ChangedBySysuserFID: ChangedBySysuserFIDChangedBySysuserFIDint4
Yes
ChangedDateTimedatetime8
Yes
Notesvarchar(max)max
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_ToDoNote: ToDoNoteIDPK_ToDoNoteToDoNoteID
Yes
IX_ToDoNote_ChangedBySysuserFIDChangedBySysuserFID
IX_ToDoNote_ToDoFIDToDoFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_ToDoNote_SysuserChangedBySysuserFID->[dbo].[Sysuser].[SysUserID]
FK_ToDoNote_ToDoCascadeToDoFID->[dbo].[ToDo].[ToDoID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ToDoNote]
(
[ToDoNoteID] [int] NOT NULL IDENTITY(1, 1),
[ToDoFID] [int] NOT NULL,
[ChangedBySysuserFID] [int] NULL,
[ChangedDateTime] [datetime] NULL,
[Notes] [varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[ToDoNote] ADD CONSTRAINT [PK_ToDoNote] PRIMARY KEY CLUSTERED  ([ToDoNoteID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ToDoNote_ChangedBySysuserFID] ON [dbo].[ToDoNote] ([ChangedBySysuserFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ToDoNote_ToDoFID] ON [dbo].[ToDoNote] ([ToDoFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ToDoNote] ADD CONSTRAINT [FK_ToDoNote_Sysuser] FOREIGN KEY ([ChangedBySysuserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[ToDoNote] ADD CONSTRAINT [FK_ToDoNote_ToDo] FOREIGN KEY ([ToDoFID]) REFERENCES [dbo].[ToDo] ([ToDoID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[ToDoNote] TO [MssExec]
GRANT INSERT ON  [dbo].[ToDoNote] TO [MssExec]
GRANT DELETE ON  [dbo].[ToDoNote] TO [MssExec]
GRANT UPDATE ON  [dbo].[ToDoNote] TO [MssExec]
GO
Uses