Tables [dbo].[InternationalCustomsAgentAddress]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
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
Cluster Primary Key PK_InternationalCustomsAgentAddress: InternationalCustomsAgentAddressIDInternationalCustomsAgentAddressIDint4
No
1 - 1
Foreign Keys FK_InternationalCustomsAgentAddress_InternationalCustomsAgent: [dbo].[InternationalCustomsAgent].InternationalCustomsAgentFIDIndexes IX_InternationalCustomsAgent_AddressType: InternationalCustomsAgentFID\AddressTypeFIDInternationalCustomsAgentFIDint4
No
Foreign Keys FK_InternationalCustomsAgentAddress_AddressType: [dbo].[AddressType].AddressTypeFIDCheck Constraints CK_InternationalCustomsAgentAddress_AddressType : ([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')Indexes IX_InternationalCustomsAgent_AddressType: InternationalCustomsAgentFID\AddressTypeFIDAddressTypeFIDint4
Yes
Address1[dbo].[Address]256
Yes
Address2[dbo].[Address]256
Yes
Address3[dbo].[Address]256
Yes
City[dbo].[AddressCity]26
Yes
State[dbo].[AddressState]2
Yes
PostalCode[dbo].[AddressPostalCode]10
Yes
Foreign Keys FK_InternationalCustomsAgentAddress_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_InternationalCustomsAgentAddress: InternationalCustomsAgentAddressIDPK_InternationalCustomsAgentAddressInternationalCustomsAgentAddressID
Yes
80
IX_InternationalCustomsAgent_AddressTypeInternationalCustomsAgentFID, AddressTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalCustomsAgentAddress_AddressTypeAddressTypeFID([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalCustomsAgentAddress_AddressTypeAddressTypeFID->[dbo].[AddressType].[AddressTypeID]
FK_InternationalCustomsAgentAddress_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalCustomsAgentAddress_InternationalCustomsAgentCascadeInternationalCustomsAgentFID->[dbo].[InternationalCustomsAgent].[InternationalCustomsAgentID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalCustomsAgentAddress]
(
[InternationalCustomsAgentAddressID] [int] NOT NULL IDENTITY(1, 1),
[InternationalCustomsAgentFID] [int] NOT NULL,
[AddressTypeFID] [int] NULL,
[Address1] [dbo].[Address] NULL,
[Address2] [dbo].[Address] NULL,
[Address3] [dbo].[Address] NULL,
[City] [dbo].[AddressCity] NULL,
[State] [dbo].[AddressState] NULL,
[PostalCode] [dbo].[AddressPostalCode] NULL,
[CountryCodeStandardFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsAgentAddress] ADD CONSTRAINT [CK_InternationalCustomsAgentAddress_AddressType] CHECK (([dbo].[GetAddressTypeName]([AddressTypeFID])='Main'))
GO
ALTER TABLE [dbo].[InternationalCustomsAgentAddress] ADD CONSTRAINT [PK_InternationalCustomsAgentAddress] PRIMARY KEY CLUSTERED  ([InternationalCustomsAgentAddressID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsAgentAddress] ADD CONSTRAINT [IX_InternationalCustomsAgent_AddressType] UNIQUE NONCLUSTERED  ([InternationalCustomsAgentFID], [AddressTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalCustomsAgentAddress] ADD CONSTRAINT [FK_InternationalCustomsAgentAddress_AddressType] FOREIGN KEY ([AddressTypeFID]) REFERENCES [dbo].[AddressType] ([AddressTypeID])
GO
ALTER TABLE [dbo].[InternationalCustomsAgentAddress] ADD CONSTRAINT [FK_InternationalCustomsAgentAddress_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalCustomsAgentAddress] ADD CONSTRAINT [FK_InternationalCustomsAgentAddress_InternationalCustomsAgent] FOREIGN KEY ([InternationalCustomsAgentFID]) REFERENCES [dbo].[InternationalCustomsAgent] ([InternationalCustomsAgentID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[InternationalCustomsAgentAddress] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalCustomsAgentAddress] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalCustomsAgentAddress] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalCustomsAgentAddress] TO [MssExec]
GO
Uses
Used By