Tables [dbo].[AccountNote]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:20:00 AM Thursday, March 21, 2019
Last Modified1:20:08 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_AccountNote_AccountNoteID: AccountNoteIDAccountNoteIDint4
False
1 - 1
Foreign Keys FK_AccountNote_AccountID_Account_AccountID: [dbo].[Account].AccountIDAccountIDint4
False
Foreign Keys FK_AccountNote_ContactID_Contact_ContactID: [dbo].[Contact].ContactIDContactIDint4
False
CreationDatedatetime8
False
Activitynvarchar(50)100
True
Durationint4
True
Bodynvarchar(max)max
False
KeyNameKey ColumnsUnique
Cluster Primary Key PK_AccountNote_AccountNoteID: AccountNoteIDPK_AccountNote_AccountNoteIDAccountNoteID
True
NameUpdateDeleteColumns
FK_AccountNote_AccountID_Account_AccountIDCascadeCascadeAccountID->[dbo].[Account].[AccountID]
FK_AccountNote_ContactID_Contact_ContactIDContactID->[dbo].[Contact].[ContactID]
CREATE TABLE [dbo].[AccountNote]
(
[AccountNoteID] [int] NOT NULL IDENTITY(1, 1),
[AccountID] [int] NOT NULL,
[ContactID] [int] NOT NULL,
[CreationDate] [datetime] NOT NULL,
[Activity] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Duration] [int] NULL,
[Body] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountNote] ADD CONSTRAINT [PK_AccountNote_AccountNoteID] PRIMARY KEY CLUSTERED  ([AccountNoteID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountNote] ADD CONSTRAINT [FK_AccountNote_AccountID_Account_AccountID] FOREIGN KEY ([AccountID]) REFERENCES [dbo].[Account] ([AccountID]) ON DELETE CASCADE ON UPDATE CASCADE
GO
ALTER TABLE [dbo].[AccountNote] ADD CONSTRAINT [FK_AccountNote_ContactID_Contact_ContactID] FOREIGN KEY ([ContactID]) REFERENCES [dbo].[Contact] ([ContactID])
GO