Tables [dbo].[InternationalLinehaulCarrierPhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created9:11:13 AM Friday, December 7, 2018
Last Modified9:11:26 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_InternationalLinehaulCarrierPhoneNumber: InternationalLinehaulCarrierPhoneNumberIDInternationalLinehaulCarrierPhoneNumberIDint4
No
1 - 1
Foreign Keys FK_InternationalLinehaulCarrierPhoneNumber_InternationalLinehaulCarrier: [dbo].[InternationalLinehaulCarrier].InternationalLinehaulCarrierFIDIndexes IX_InternationalLinehaulCarrier_PhoneType: InternationalLinehaulCarrierFID\PhoneTypeFIDInternationalLinehaulCarrierFIDint4
No
Foreign Keys FK_InternationalLinehaulCarrierPhoneNumber_PhoneType: [dbo].[PhoneType].PhoneTypeFIDCheck Constraints CK_InternationalLinehaulCarrierPhoneNumber_PhoneType : ([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')Indexes IX_InternationalLinehaulCarrier_PhoneType: InternationalLinehaulCarrierFID\PhoneTypeFIDPhoneTypeFIDint4
No
Foreign Keys FK_InternationalLinehaulCarrierPhoneNumber_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
AreaCode[dbo].[PhoneAreaCode]4
Yes
LocalNumber[dbo].[PhoneLocalNumber]20
Yes
Extension[dbo].[PhoneExtension]10
Yes
Indexes Indexes
NameColumnsUnique
Primary Key PK_InternationalLinehaulCarrierPhoneNumber: InternationalLinehaulCarrierPhoneNumberIDPK_InternationalLinehaulCarrierPhoneNumberInternationalLinehaulCarrierPhoneNumberID
Yes
IX_InternationalLinehaulCarrier_PhoneTypeInternationalLinehaulCarrierFID, PhoneTypeFID
Yes
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalLinehaulCarrierPhoneNumber_PhoneTypePhoneTypeFID([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalLinehaulCarrierPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalLinehaulCarrierPhoneNumber_InternationalLinehaulCarrierCascadeInternationalLinehaulCarrierFID->[dbo].[InternationalLinehaulCarrier].[InternationalLinehaulCarrierID]
FK_InternationalLinehaulCarrierPhoneNumber_PhoneTypePhoneTypeFID->[dbo].[PhoneType].[PhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalLinehaulCarrierPhoneNumber]
(
[InternationalLinehaulCarrierPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[InternationalLinehaulCarrierFID] [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].[InternationalLinehaulCarrierPhoneNumber] ADD CONSTRAINT [CK_InternationalLinehaulCarrierPhoneNumber_PhoneType] CHECK (([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main'))
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierPhoneNumber] ADD CONSTRAINT [PK_InternationalLinehaulCarrierPhoneNumber] PRIMARY KEY NONCLUSTERED  ([InternationalLinehaulCarrierPhoneNumberID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierPhoneNumber] ADD CONSTRAINT [IX_InternationalLinehaulCarrier_PhoneType] UNIQUE NONCLUSTERED  ([InternationalLinehaulCarrierFID], [PhoneTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierPhoneNumber] ADD CONSTRAINT [FK_InternationalLinehaulCarrierPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierPhoneNumber] ADD CONSTRAINT [FK_InternationalLinehaulCarrierPhoneNumber_InternationalLinehaulCarrier] FOREIGN KEY ([InternationalLinehaulCarrierFID]) REFERENCES [dbo].[InternationalLinehaulCarrier] ([InternationalLinehaulCarrierID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierPhoneNumber] ADD CONSTRAINT [FK_InternationalLinehaulCarrierPhoneNumber_PhoneType] FOREIGN KEY ([PhoneTypeFID]) REFERENCES [dbo].[PhoneType] ([PhoneTypeID])
GO
GRANT SELECT ON  [dbo].[InternationalLinehaulCarrierPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalLinehaulCarrierPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalLinehaulCarrierPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalLinehaulCarrierPhoneNumber] TO [MssExec]
GO
Uses