Tables [dbo].[InternationalCustomsAgentPhoneNumber]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created10:12:50 PM Thursday, December 28, 2006
Last Modified11:13:39 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_InternationalCustomsAgentPhoneNumber: InternationalCustomsAgentPhoneNumberIDInternationalCustomsAgentPhoneNumberIDint4
No
1 - 1
Foreign Keys FK_InternationalCustomsAgentPhoneNumber_InternationalCustomsAgent: [dbo].[InternationalCustomsAgent].InternationalCustomsAgentFIDIndexes IX_InternationalCustomsAgent_PhoneType: InternationalCustomsAgentFID\PhoneTypeFIDInternationalCustomsAgentFIDint4
No
Foreign Keys FK_InternationalCustomsAgentPhoneNumber_PhoneType: [dbo].[PhoneType].PhoneTypeFIDCheck Constraints CK_InternationalCustomsAgentPhoneNumber_PhoneType : ([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')Indexes IX_InternationalCustomsAgent_PhoneType: InternationalCustomsAgentFID\PhoneTypeFIDPhoneTypeFIDint4
No
Foreign Keys FK_InternationalCustomsAgentPhoneNumber_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_InternationalCustomsAgentPhoneNumber: InternationalCustomsAgentPhoneNumberIDPK_InternationalCustomsAgentPhoneNumberInternationalCustomsAgentPhoneNumberID
Yes
80
IX_InternationalCustomsAgent_PhoneTypeInternationalCustomsAgentFID, PhoneTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalCustomsAgentPhoneNumber_PhoneTypePhoneTypeFID([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalCustomsAgentPhoneNumber_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalCustomsAgentPhoneNumber_InternationalCustomsAgentCascadeInternationalCustomsAgentFID->[dbo].[InternationalCustomsAgent].[InternationalCustomsAgentID]
FK_InternationalCustomsAgentPhoneNumber_PhoneTypePhoneTypeFID->[dbo].[PhoneType].[PhoneTypeID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalCustomsAgentPhoneNumber]
(
[InternationalCustomsAgentPhoneNumberID] [int] NOT NULL IDENTITY(1, 1),
[InternationalCustomsAgentFID] [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].[InternationalCustomsAgentPhoneNumber] ADD CONSTRAINT [CK_InternationalCustomsAgentPhoneNumber_PhoneType] CHECK (([dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Fax' OR [dbo].[GetPhoneNumberTypeName]([PhoneTypeFID])='Main'))
GO
ALTER TABLE [dbo].[InternationalCustomsAgentPhoneNumber] ADD CONSTRAINT [PK_InternationalCustomsAgentPhoneNumber] PRIMARY KEY NONCLUSTERED  ([InternationalCustomsAgentPhoneNumberID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsAgentPhoneNumber] ADD CONSTRAINT [IX_InternationalCustomsAgent_PhoneType] UNIQUE NONCLUSTERED  ([InternationalCustomsAgentFID], [PhoneTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsAgentPhoneNumber] ADD CONSTRAINT [FK_InternationalCustomsAgentPhoneNumber_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalCustomsAgentPhoneNumber] ADD CONSTRAINT [FK_InternationalCustomsAgentPhoneNumber_InternationalCustomsAgent] FOREIGN KEY ([InternationalCustomsAgentFID]) REFERENCES [dbo].[InternationalCustomsAgent] ([InternationalCustomsAgentID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[InternationalCustomsAgentPhoneNumber] ADD CONSTRAINT [FK_InternationalCustomsAgentPhoneNumber_PhoneType] FOREIGN KEY ([PhoneTypeFID]) REFERENCES [dbo].[PhoneType] ([PhoneTypeID])
GO
GRANT SELECT ON  [dbo].[InternationalCustomsAgentPhoneNumber] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalCustomsAgentPhoneNumber] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalCustomsAgentPhoneNumber] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalCustomsAgentPhoneNumber] TO [MssExec]
GO
Uses