Tables [dbo].[InternationalCarrierPhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created10:12:52 PM Thursday, December 28, 2006
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_InternationalCarrierPhoneNumber: InternationalCarrierPhoneNumberIDInternationalCarrierPhoneNumberIDint4
No
1 - 1
Foreign Keys FK_InternationalCarrierPhoneNumber_InternationalCarrier: [dbo].[InternationalCarrier].InternationalCarrierFIDIndexes IX_InternationalCarrier_PhoneType: InternationalCarrierFID\PhoneTypeFIDInternationalCarrierFIDint4
No
Foreign Keys FK_InternationalCarrierPhoneNumber_PhoneType: [dbo].[PhoneType].PhoneTypeFIDCheck Constraints CK_InternationalCarrierPhoneNumber_PhoneType : ([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')Indexes IX_InternationalCarrier_PhoneType: InternationalCarrierFID\PhoneTypeFIDPhoneTypeFIDint4
No
Foreign Keys FK_InternationalCarrierPhoneNumber_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_InternationalCarrierPhoneNumber: InternationalCarrierPhoneNumberIDPK_InternationalCarrierPhoneNumberInternationalCarrierPhoneNumberID
Yes
80
IX_InternationalCarrier_PhoneTypeInternationalCarrierFID, PhoneTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalCarrierPhoneNumber_PhoneTypePhoneTypeFID([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalCarrierPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalCarrierPhoneNumber_InternationalCarrierCascadeInternationalCarrierFID->[dbo].[InternationalCarrier].[InternationalCarrierID]
FK_InternationalCarrierPhoneNumber_PhoneTypePhoneTypeFID->[dbo].[PhoneType].[PhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalCarrierPhoneNumber]
(
[InternationalCarrierPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[InternationalCarrierFID] [int] NOT NULL,
[PhoneTypeFID] [int] NOT NULL,
[CountryCodeStandardFID] [int] NULL,
[AreaCode] [dbo].[PhoneAreaCode] NULL,
[LocalNumber] [dbo].[PhoneLocalNumber] NULL,
[Extension] [dbo].[PhoneExtension] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCarrierPhoneNumber] ADD CONSTRAINT [CK_InternationalCarrierPhoneNumber_PhoneType] CHECK (([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main'))
GO
ALTER TABLE [dbo].[InternationalCarrierPhoneNumber] ADD CONSTRAINT [PK_InternationalCarrierPhoneNumber] PRIMARY KEY NONCLUSTERED  ([InternationalCarrierPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCarrierPhoneNumber] ADD CONSTRAINT [IX_InternationalCarrier_PhoneType] UNIQUE NONCLUSTERED  ([InternationalCarrierFID], [PhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCarrierPhoneNumber] ADD CONSTRAINT [FK_InternationalCarrierPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalCarrierPhoneNumber] ADD CONSTRAINT [FK_InternationalCarrierPhoneNumber_InternationalCarrier] FOREIGN KEY ([InternationalCarrierFID]) REFERENCES [dbo].[InternationalCarrier] ([InternationalCarrierID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[InternationalCarrierPhoneNumber] ADD CONSTRAINT [FK_InternationalCarrierPhoneNumber_PhoneType] FOREIGN KEY ([PhoneTypeFID]) REFERENCES [dbo].[PhoneType] ([PhoneTypeID])
GO
GRANT SELECT ON  [dbo].[InternationalCarrierPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalCarrierPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalCarrierPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalCarrierPhoneNumber] TO [MssExec]
GO
Uses