Tables [dbo].[AgentContact]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)2635
Created4:03:00 PM Thursday, December 6, 2018
Last Modified9:00:51 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Primary Key PK_AgentContact: AgentContactIDAgentContactIDint4
No
1 - 1
Foreign Keys FK_AgentContact_Agent: [dbo].[Agent].AgentFIDIndexes ix_AgentContact_Agent: AgentFIDIndexes IX_AgentContact_AgentContactIDPrimaryContact: AgentFID\PrimaryContactAgentFIDint4
No
Contactvarchar(30)30
Yes
Titlevarchar(50)50
Yes
Emailvarchar(120)120
Yes
Indexes IX_AgentContact_AgentContactIDPrimaryContact: AgentFID\PrimaryContactPrimaryContactbit1
No
((0))
Indexes Indexes
NameColumnsUnique
Primary Key PK_AgentContact: AgentContactIDPK_AgentContactAgentContactID
Yes
ix_AgentContact_AgentAgentFID
IX_AgentContact_AgentContactIDPrimaryContactAgentFID, PrimaryContact
Check Constraints Check Constraints
NameConstraint
CK_AgentContact_PrimaryContact((0)=[dbo].[AgentContactPrimaryContact]([AgentContactID],[AgentFID],[PrimaryContact]))
Foreign Keys Foreign Keys
NameDeleteColumns
FK_AgentContact_AgentCascadeAgentFID->[dbo].[Agent].[AgentPriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AgentContact]
(
[AgentContactID] [int] NOT NULL IDENTITY(1, 1),
[AgentFID] [int] NOT NULL,
[Contact] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Title] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PrimaryContact] [bit] NOT NULL CONSTRAINT [DF_AgentContact_Primary] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentContact] ADD CONSTRAINT [CK_AgentContact_PrimaryContact] CHECK (((0)=[dbo].[AgentContactPrimaryContact]([AgentContactID],[AgentFID],[PrimaryContact])))
GO
ALTER TABLE [dbo].[AgentContact] ADD CONSTRAINT [PK_AgentContact] PRIMARY KEY NONCLUSTERED  ([AgentContactID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [ix_AgentContact_Agent] ON [dbo].[AgentContact] ([AgentFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_AgentContact_AgentContactIDPrimaryContact] ON [dbo].[AgentContact] ([AgentFID], [PrimaryContact] DESC) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentContact] ADD CONSTRAINT [FK_AgentContact_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[AgentContact] TO [MssExec]
GRANT INSERT ON  [dbo].[AgentContact] TO [MssExec]
GRANT DELETE ON  [dbo].[AgentContact] TO [MssExec]
GRANT UPDATE ON  [dbo].[AgentContact] TO [MssExec]
GO
Uses
Used By