Tables [dbo].[InternationalBookingNumberPhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created10:12:49 PM Thursday, December 28, 2006
Last Modified9:02:42 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_InternationalBookingNumberPhoneNumber: InternationalBookingNumberPhoneNumberIDInternationalBookingNumberPhoneNumberIDint4
No
1 - 1
Foreign Keys FK_InternationalBookingNumberPhoneNumber_InternationalBookingNumber: [dbo].[InternationalBookingNumber].InternationalBookingNumberFIDIndexes IX_InternationalBookingNumber_PhoneType: InternationalBookingNumberFID\PhoneTypeFIDInternationalBookingNumberFIDint4
No
Foreign Keys FK_InternationalBookingNumberPhoneNumber_PhoneType: [dbo].[PhoneType].PhoneTypeFIDCheck Constraints CK_InternationalBookingNumberPhoneNumber_PhoneType : ([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Return' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Pickup' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Transit')Indexes IX_InternationalBookingNumber_PhoneType: InternationalBookingNumberFID\PhoneTypeFIDPhoneTypeFIDint4
No
Foreign Keys FK_InternationalBookingNumberPhoneNumber_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_InternationalBookingNumberPhoneNumber: InternationalBookingNumberPhoneNumberIDPK_InternationalBookingNumberPhoneNumberInternationalBookingNumberPhoneNumberID
Yes
80
IX_InternationalBookingNumber_PhoneTypeInternationalBookingNumberFID, PhoneTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalBookingNumberPhoneNumber_PhoneTypePhoneTypeFID([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Return' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Pickup' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Transit')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalBookingNumberPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalBookingNumberPhoneNumber_InternationalBookingNumberCascadeInternationalBookingNumberFID->[dbo].[InternationalBookingNumber].[InternationalBookingNumberID]
FK_InternationalBookingNumberPhoneNumber_PhoneTypePhoneTypeFID->[dbo].[PhoneType].[PhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalBookingNumberPhoneNumber]
(
[InternationalBookingNumberPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[InternationalBookingNumberFID] [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].[InternationalBookingNumberPhoneNumber] ADD CONSTRAINT [CK_InternationalBookingNumberPhoneNumber_PhoneType] CHECK (([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Return' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Pickup' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Transit'))
GO
ALTER TABLE [dbo].[InternationalBookingNumberPhoneNumber] ADD CONSTRAINT [PK_InternationalBookingNumberPhoneNumber] PRIMARY KEY NONCLUSTERED  ([InternationalBookingNumberPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBookingNumberPhoneNumber] ADD CONSTRAINT [IX_InternationalBookingNumber_PhoneType] UNIQUE NONCLUSTERED  ([InternationalBookingNumberFID], [PhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBookingNumberPhoneNumber] ADD CONSTRAINT [FK_InternationalBookingNumberPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalBookingNumberPhoneNumber] ADD CONSTRAINT [FK_InternationalBookingNumberPhoneNumber_InternationalBookingNumber] FOREIGN KEY ([InternationalBookingNumberFID]) REFERENCES [dbo].[InternationalBookingNumber] ([InternationalBookingNumberID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[InternationalBookingNumberPhoneNumber] ADD CONSTRAINT [FK_InternationalBookingNumberPhoneNumber_PhoneType] FOREIGN KEY ([PhoneTypeFID]) REFERENCES [dbo].[PhoneType] ([PhoneTypeID])
GO
GRANT SELECT ON  [dbo].[InternationalBookingNumberPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalBookingNumberPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalBookingNumberPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalBookingNumberPhoneNumber] TO [MssExec]
GO
Uses
Used By