Tables [dbo].[InternationalConsolidatorPhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created10:12:49 PM Thursday, December 28, 2006
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_InternationalConsolidatorPhoneNumber: InternationalConsolidatorPhoneNumberIDInternationalConsolidatorPhoneNumberIDint4
No
1 - 1
Foreign Keys FK_InternationalConsolidatorPhoneNumber_InternationalConsolidator: [dbo].[InternationalConsolidator].InternationalConsolidatorFIDIndexes IX_InternationalConsolidator_PhoneType: InternationalConsolidatorFID\PhoneTypeFIDInternationalConsolidatorFIDint4
No
Foreign Keys FK_InternationalConsolidatorPhoneNumber_PhoneType: [dbo].[PhoneType].PhoneTypeFIDCheck Constraints CK_InternationalConsolidatorPhoneNumber_PhoneType : ([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')Indexes IX_InternationalConsolidator_PhoneType: InternationalConsolidatorFID\PhoneTypeFIDPhoneTypeFIDint4
No
Foreign Keys FK_InternationalConsolidatorPhoneNumber_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_InternationalConsolidatorPhoneNumber: InternationalConsolidatorPhoneNumberIDPK_InternationalConsolidatorPhoneNumberInternationalConsolidatorPhoneNumberID
Yes
80
IX_InternationalConsolidator_PhoneTypeInternationalConsolidatorFID, PhoneTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalConsolidatorPhoneNumber_PhoneTypePhoneTypeFID([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalConsolidatorPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalConsolidatorPhoneNumber_InternationalConsolidatorCascadeInternationalConsolidatorFID->[dbo].[InternationalConsolidator].[InternationalConsolidatorID]
FK_InternationalConsolidatorPhoneNumber_PhoneTypePhoneTypeFID->[dbo].[PhoneType].[PhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalConsolidatorPhoneNumber]
(
[InternationalConsolidatorPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[InternationalConsolidatorFID] [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].[InternationalConsolidatorPhoneNumber] ADD CONSTRAINT [CK_InternationalConsolidatorPhoneNumber_PhoneType] CHECK (([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main'))
GO
ALTER TABLE [dbo].[InternationalConsolidatorPhoneNumber] ADD CONSTRAINT [PK_InternationalConsolidatorPhoneNumber] PRIMARY KEY NONCLUSTERED  ([InternationalConsolidatorPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalConsolidatorPhoneNumber] ADD CONSTRAINT [IX_InternationalConsolidator_PhoneType] UNIQUE NONCLUSTERED  ([InternationalConsolidatorFID], [PhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalConsolidatorPhoneNumber] ADD CONSTRAINT [FK_InternationalConsolidatorPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalConsolidatorPhoneNumber] ADD CONSTRAINT [FK_InternationalConsolidatorPhoneNumber_InternationalConsolidator] FOREIGN KEY ([InternationalConsolidatorFID]) REFERENCES [dbo].[InternationalConsolidator] ([InternationalConsolidatorID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[InternationalConsolidatorPhoneNumber] ADD CONSTRAINT [FK_InternationalConsolidatorPhoneNumber_PhoneType] FOREIGN KEY ([PhoneTypeFID]) REFERENCES [dbo].[PhoneType] ([PhoneTypeID])
GO
GRANT SELECT ON  [dbo].[InternationalConsolidatorPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalConsolidatorPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalConsolidatorPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalConsolidatorPhoneNumber] TO [MssExec]
GO
Uses