Tables [dbo].[InternationalLinehaulCarrierAddress]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)540
Created9:11:13 AM Friday, December 7, 2018
Last Modified9:11:26 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_InternationalLinehaulCarrierAddress: InternationalLinehaulCarrierAddressIDInternationalLinehaulCarrierAddressIDint4
No
1 - 1
Foreign Keys FK_InternationalLinehaulCarrierAddress_InternationalLinehaulCarrier: [dbo].[InternationalLinehaulCarrier].InternationalLinehaulCarrierFIDIndexes IX_InternationalLinehaulCarrier_AddressType: InternationalLinehaulCarrierFID\AddressTypeFIDInternationalLinehaulCarrierFIDint4
No
Foreign Keys FK_InternationalLinehaulCarrierAddress_AddressType: [dbo].[AddressType].AddressTypeFIDCheck Constraints CK_InternationalLinehaulCarrierAddress_AddressType : ([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')Indexes IX_InternationalLinehaulCarrier_AddressType: InternationalLinehaulCarrierFID\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_InternationalLinehaulCarrierAddress_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_InternationalLinehaulCarrierAddress: InternationalLinehaulCarrierAddressIDPK_InternationalLinehaulCarrierAddressInternationalLinehaulCarrierAddressID
Yes
IX_InternationalLinehaulCarrier_AddressTypeInternationalLinehaulCarrierFID, AddressTypeFID
Yes
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalLinehaulCarrierAddress_AddressTypeAddressTypeFID([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalLinehaulCarrierAddress_AddressTypeAddressTypeFID->[dbo].[AddressType].[AddressTypeID]
FK_InternationalLinehaulCarrierAddress_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalLinehaulCarrierAddress_InternationalLinehaulCarrierCascadeInternationalLinehaulCarrierFID->[dbo].[InternationalLinehaulCarrier].[InternationalLinehaulCarrierID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalLinehaulCarrierAddress]
(
[InternationalLinehaulCarrierAddressID] [int] NOT NULL IDENTITY(1, 1),
[InternationalLinehaulCarrierFID] [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].[InternationalLinehaulCarrierAddress] ADD CONSTRAINT [CK_InternationalLinehaulCarrierAddress_AddressType] CHECK (([dbo].[GetAddressTypeName]([AddressTypeFID])='Main'))
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierAddress] ADD CONSTRAINT [PK_InternationalLinehaulCarrierAddress] PRIMARY KEY CLUSTERED  ([InternationalLinehaulCarrierAddressID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierAddress] ADD CONSTRAINT [IX_InternationalLinehaulCarrier_AddressType] UNIQUE NONCLUSTERED  ([InternationalLinehaulCarrierFID], [AddressTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierAddress] ADD CONSTRAINT [FK_InternationalLinehaulCarrierAddress_AddressType] FOREIGN KEY ([AddressTypeFID]) REFERENCES [dbo].[AddressType] ([AddressTypeID])
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierAddress] ADD CONSTRAINT [FK_InternationalLinehaulCarrierAddress_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalLinehaulCarrierAddress] ADD CONSTRAINT [FK_InternationalLinehaulCarrierAddress_InternationalLinehaulCarrier] FOREIGN KEY ([InternationalLinehaulCarrierFID]) REFERENCES [dbo].[InternationalLinehaulCarrier] ([InternationalLinehaulCarrierID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[InternationalLinehaulCarrierAddress] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalLinehaulCarrierAddress] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalLinehaulCarrierAddress] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalLinehaulCarrierAddress] TO [MssExec]
GO
Uses
Used By