Tables [dbo].[AgentPhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)2813
Created4:57:07 PM Thursday, September 7, 2006
Last Modified11:13:37 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_AgentPhoneNumber: AgentPhoneNumberIDAgentPhoneNumberIDint4
No
1 - 1
Cluster Key IX_AgentPhoneNumber_AgentAndPhoneType: AgentFID\AgentPhoneTypeFIDForeign Keys FK_AgentPhoneNumber_Agent: [dbo].[Agent].AgentFIDAgentFIDint4
No
Cluster Key IX_AgentPhoneNumber_AgentAndPhoneType: AgentFID\AgentPhoneTypeFIDForeign Keys FK_AgentPhoneNumber_AgentPhoneType: [dbo].[AgentPhoneType].AgentPhoneTypeFIDAgentPhoneTypeFIDint4
No
Foreign Keys FK_AgentPhoneNumber_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
AreaCode[dbo].[PhoneAreaCode]4
Yes
LocalNumber[dbo].[PhoneLocalNumber]20
Yes
Extension[dbo].[PhoneExtension]10
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_AgentPhoneNumber: AgentPhoneNumberIDPK_AgentPhoneNumberAgentPhoneNumberID
Yes
80
Cluster Key IX_AgentPhoneNumber_AgentAndPhoneType: AgentFID\AgentPhoneTypeFIDIX_AgentPhoneNumber_AgentAndPhoneTypeAgentFID, AgentPhoneTypeFID
Yes
80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_AgentPhoneNumber_AgentCascadeAgentFID->[dbo].[Agent].[AgentPriKey]
FK_AgentPhoneNumber_AgentPhoneTypeAgentPhoneTypeFID->[dbo].[AgentPhoneType].[AgentPhoneTypeID]
FK_AgentPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AgentPhoneNumber]
(
[AgentPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[AgentFID] [int] NOT NULL,
[AgentPhoneTypeFID] [int] NOT NULL,
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentPhoneNumber] ADD CONSTRAINT [PK_AgentPhoneNumber] PRIMARY KEY NONCLUSTERED  ([AgentPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentPhoneNumber] ADD CONSTRAINT [IX_AgentPhoneNumber_AgentAndPhoneType] UNIQUE CLUSTERED  ([AgentFID], [AgentPhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AgentPhoneNumber] ADD CONSTRAINT [FK_AgentPhoneNumber_Agent] FOREIGN KEY ([AgentFID]) REFERENCES [dbo].[Agent] ([AgentPriKey]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AgentPhoneNumber] ADD CONSTRAINT [FK_AgentPhoneNumber_AgentPhoneType] FOREIGN KEY ([AgentPhoneTypeFID]) REFERENCES [dbo].[AgentPhoneType] ([AgentPhoneTypeID])
GO
ALTER TABLE [dbo].[AgentPhoneNumber] ADD CONSTRAINT [FK_AgentPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
GRANT SELECT ON  [dbo].[AgentPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[AgentPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[AgentPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[AgentPhoneNumber] TO [MssExec]
GO
Uses
Used By