Tables [dbo].[ProfilePhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created4:57:08 PM Thursday, September 7, 2006
Last Modified11:13:41 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_ProfilePhoneNumber: ProfilePhoneNumberIDProfilePhoneNumberIDint4
No
1 - 1
Foreign Keys FK_ProfilePhoneNumber_Profiles: [dbo].[Profiles].ProfileFIDIndexes IX_ProfilePhoneNumber_ProfileAndPhoneType: ProfileFID\ProfilePhoneTypeFIDProfileFIDint4
No
Foreign Keys FK_ProfilePhoneNumber_ProfilePhoneType: [dbo].[ProfilePhoneType].ProfilePhoneTypeFIDIndexes IX_ProfilePhoneNumber_ProfileAndPhoneType: ProfileFID\ProfilePhoneTypeFIDProfilePhoneTypeFIDint4
No
Foreign Keys FK_ProfilePhoneNumber_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_ProfilePhoneNumber: ProfilePhoneNumberIDPK_ProfilePhoneNumberProfilePhoneNumberID
Yes
80
IX_ProfilePhoneNumber_ProfileAndPhoneTypeProfileFID, ProfilePhoneTypeFID
Yes
80
Foreign Keys Foreign Keys
NameDeleteColumns
FK_ProfilePhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_ProfilePhoneNumber_ProfilesCascadeProfileFID->[dbo].[Profiles].[ProfileID]
FK_ProfilePhoneNumber_ProfilePhoneTypeProfilePhoneTypeFID->[dbo].[ProfilePhoneType].[ProfilePhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[ProfilePhoneNumber]
(
[ProfilePhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[ProfileFID] [int] NOT NULL,
[ProfilePhoneTypeFID] [int] NOT NULL,
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ProfilePhoneNumber] ADD CONSTRAINT [PK_ProfilePhoneNumber] PRIMARY KEY NONCLUSTERED  ([ProfilePhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ProfilePhoneNumber] ADD CONSTRAINT [IX_ProfilePhoneNumber_ProfileAndPhoneType] UNIQUE NONCLUSTERED  ([ProfileFID], [ProfilePhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ProfilePhoneNumber] ADD CONSTRAINT [FK_ProfilePhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[ProfilePhoneNumber] ADD CONSTRAINT [FK_ProfilePhoneNumber_Profiles] FOREIGN KEY ([ProfileFID]) REFERENCES [dbo].[Profiles] ([ProfileID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[ProfilePhoneNumber] ADD CONSTRAINT [FK_ProfilePhoneNumber_ProfilePhoneType] FOREIGN KEY ([ProfilePhoneTypeFID]) REFERENCES [dbo].[ProfilePhoneType] ([ProfilePhoneTypeID])
GO
GRANT SELECT ON  [dbo].[ProfilePhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[ProfilePhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[ProfilePhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[ProfilePhoneNumber] TO [MssExec]
GO
Uses