Tables [dbo].[AccountProfileContactPhoneNumber]
This table stores the phone numbers of contacts for a national account
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created4:57:05 PM Thursday, September 7, 2006
Last Modified11:13:37 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDescription
Primary Key PK_AccountProfileContactPhoneNumber: AccountProfileContactPhoneNumberIDAccountProfileContactPhoneNumberIDint4
No
1 - 1Primary key of this table
Foreign Keys FK_AccountProfileContactPhoneNumber_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
Key associating a record to a country code
AreaCode[dbo].[PhoneAreaCode]4
Yes
The area code of the phone number for a national account
LocalNumber[dbo].[PhoneLocalNumber]20
Yes
The local phone number for a national account
Extension[dbo].[PhoneExtension]10
Yes
The phone number extension for a contact within a national account
Foreign Keys FK_AccountProfileContactPhoneNumber_AccountProfileContact: [dbo].[AccountProfileContacts].AccountProfileContactFIDIndexes IX_AccountProfileContactPhoneNumber_AccountProfileContactAndPhoneType: AccountProfileContactFID\AccountProfileContactPhoneTypeFIDAccountProfileContactFIDint4
No
Key linking this table to a national account contact record
Foreign Keys FK_AccountProfileContactPhoneNumber_AccountProfileContactPhoneType: [dbo].[AccountProfileContactPhoneType].AccountProfileContactPhoneTypeFIDIndexes IX_AccountProfileContactPhoneNumber_AccountProfileContactAndPhoneType: AccountProfileContactFID\AccountProfileContactPhoneTypeFIDAccountProfileContactPhoneTypeFIDint4
No
Key associating a record to a contact phone type
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_AccountProfileContactPhoneNumber: AccountProfileContactPhoneNumberIDPK_AccountProfileContactPhoneNumberAccountProfileContactPhoneNumberID
Yes
80
IX_AccountProfileContactPhoneNumber_AccountProfileContactAndPhoneTypeAccountProfileContactFID, AccountProfileContactPhoneTypeFID
Yes
80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_AccountProfileContactPhoneNumber_AccountProfileContactCascadeAccountProfileContactFID->[dbo].[AccountProfileContacts].[AccountProfileContactID]
FK_AccountProfileContactPhoneNumber_AccountProfileContactPhoneTypeAccountProfileContactPhoneTypeFID->[dbo].[AccountProfileContactPhoneType].[AccountProfileContactPhoneTypeID]
FK_AccountProfileContactPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[AccountProfileContactPhoneNumber]
(
[AccountProfileContactPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL,
[AccountProfileContactFID] [int] NOT NULL,
[AccountProfileContactPhoneTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileContactPhoneNumber] ADD CONSTRAINT [PK_AccountProfileContactPhoneNumber] PRIMARY KEY NONCLUSTERED  ([AccountProfileContactPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileContactPhoneNumber] ADD CONSTRAINT [IX_AccountProfileContactPhoneNumber_AccountProfileContactAndPhoneType] UNIQUE NONCLUSTERED  ([AccountProfileContactFID], [AccountProfileContactPhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AccountProfileContactPhoneNumber] ADD CONSTRAINT [FK_AccountProfileContactPhoneNumber_AccountProfileContact] FOREIGN KEY ([AccountProfileContactFID]) REFERENCES [dbo].[AccountProfileContacts] ([AccountProfileContactID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[AccountProfileContactPhoneNumber] ADD CONSTRAINT [FK_AccountProfileContactPhoneNumber_AccountProfileContactPhoneType] FOREIGN KEY ([AccountProfileContactPhoneTypeFID]) REFERENCES [dbo].[AccountProfileContactPhoneType] ([AccountProfileContactPhoneTypeID])
GO
ALTER TABLE [dbo].[AccountProfileContactPhoneNumber] ADD CONSTRAINT [FK_AccountProfileContactPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
GRANT SELECT ON  [dbo].[AccountProfileContactPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[AccountProfileContactPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[AccountProfileContactPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[AccountProfileContactPhoneNumber] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'This table stores the phone numbers of contacts for a national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key linking this table to a national account contact record', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'AccountProfileContactFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key of this table', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'AccountProfileContactPhoneNumberID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key associating a record to a contact phone type', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'AccountProfileContactPhoneTypeFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The area code of the phone number for a national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'AreaCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Key associating a record to a country code', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'CountryCodeStandardFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The phone number extension for a contact within a national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'Extension'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The local phone number for a national account', 'SCHEMA', N'dbo', 'TABLE', N'AccountProfileContactPhoneNumber', 'COLUMN', N'LocalNumber'
GO
Uses
Used By