Tables [dbo].[InternationalBookingNumberAddress]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created10:12:49 PM Thursday, December 28, 2006
Last Modified9:52:18 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_InternationalBookingNumberAddress: InternationalBookingNumberAddressIDInternationalBookingNumberAddressIDint4
No
1 - 1
Foreign Keys FK_InternationalBookingNumberAddress_InternationalBookingNumber: [dbo].[InternationalBookingNumber].InternationalBookingNumberFIDIndexes IX_InternationalBookingNumberAddress_AddressType: InternationalBookingNumberFID\AddressTypeFIDInternationalBookingNumberFIDint4
No
Contactvarchar(128)128
Yes
Foreign Keys FK_InternationalBookingNumberAddress_AddressType: [dbo].[AddressType].AddressTypeFIDCheck Constraints CK_InternationalBookingNumberAddress_AddressType : ([dbo].[GetAddressTypeName]([AddressTypeFID])='Return' OR [dbo].[GetAddressTypeName]([AddressTypeFID])='Pickup')Indexes IX_InternationalBookingNumberAddress_AddressType: InternationalBookingNumberFID\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_InternationalBookingNumberAddress_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
Namevarchar(64)64
Yes
Emailvarchar(50)50
Yes
Foreign Keys FK_InternationalBookingNumberAddress_InternationalBookingNumberLocationType: [dbo].[InternationalBookingNumberLocationType].InternationalBookingNumberLocationTypeFIDInternationalBookingNumberLocationTypeFIDint4
Yes
LocationCodevarchar(32)32
Yes
Foreign Keys FK_InternationalBookingNumberAddress_InternationalConsolidator: [dbo].[InternationalConsolidator].InternationalConsolidatorFIDInternationalConsolidatorFIDint4
Yes
Foreign Keys FK_InternationalBookingNumberAddress_InternationalPort: [dbo].[InternationalPort].InternationalPortFIDInternationalPortFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_InternationalBookingNumberAddress: InternationalBookingNumberAddressIDPK_InternationalBookingNumberAddressInternationalBookingNumberAddressID
Yes
80
IX_InternationalBookingNumberAddress_AddressTypeInternationalBookingNumberFID, AddressTypeFID
Yes
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_InternationalBookingNumberAddress_AddressTypeAddressTypeFID([dbo].[GetAddressTypeName]([AddressTypeFID])='Return' OR [dbo].[GetAddressTypeName]([AddressTypeFID])='Pickup')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_InternationalBookingNumberAddress_AddressTypeAddressTypeFID->[dbo].[AddressType].[AddressTypeID]
FK_InternationalBookingNumberAddress_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_InternationalBookingNumberAddress_InternationalBookingNumberCascadeInternationalBookingNumberFID->[dbo].[InternationalBookingNumber].[InternationalBookingNumberID]
FK_InternationalBookingNumberAddress_InternationalBookingNumberLocationTypeInternationalBookingNumberLocationTypeFID->[dbo].[InternationalBookingNumberLocationType].[InternationalBookingNumberLocationTypeID]
FK_InternationalBookingNumberAddress_InternationalConsolidatorInternationalConsolidatorFID->[dbo].[InternationalConsolidator].[InternationalConsolidatorID]
FK_InternationalBookingNumberAddress_InternationalPortInternationalPortFID->[dbo].[InternationalPort].[InternationalPortID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[InternationalBookingNumberAddress]
(
[InternationalBookingNumberAddressID] [int] NOT NULL IDENTITY(1, 1),
[InternationalBookingNumberFID] [int] NOT NULL,
[Contact] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS 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,
[Name] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InternationalBookingNumberLocationTypeFID] [int] NULL,
[LocationCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InternationalConsolidatorFID] [int] NULL,
[InternationalPortFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [CK_InternationalBookingNumberAddress_AddressType] CHECK (([dbo].[GetAddressTypeName]([AddressTypeFID])='Return' OR [dbo].[GetAddressTypeName]([AddressTypeFID])='Pickup'))
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [PK_InternationalBookingNumberAddress] PRIMARY KEY CLUSTERED  ([InternationalBookingNumberAddressID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [IX_InternationalBookingNumberAddress_AddressType] UNIQUE NONCLUSTERED  ([InternationalBookingNumberFID], [AddressTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [FK_InternationalBookingNumberAddress_AddressType] FOREIGN KEY ([AddressTypeFID]) REFERENCES [dbo].[AddressType] ([AddressTypeID])
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [FK_InternationalBookingNumberAddress_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [FK_InternationalBookingNumberAddress_InternationalBookingNumber] FOREIGN KEY ([InternationalBookingNumberFID]) REFERENCES [dbo].[InternationalBookingNumber] ([InternationalBookingNumberID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [FK_InternationalBookingNumberAddress_InternationalBookingNumberLocationType] FOREIGN KEY ([InternationalBookingNumberLocationTypeFID]) REFERENCES [dbo].[InternationalBookingNumberLocationType] ([InternationalBookingNumberLocationTypeID])
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [FK_InternationalBookingNumberAddress_InternationalConsolidator] FOREIGN KEY ([InternationalConsolidatorFID]) REFERENCES [dbo].[InternationalConsolidator] ([InternationalConsolidatorID])
GO
ALTER TABLE [dbo].[InternationalBookingNumberAddress] ADD CONSTRAINT [FK_InternationalBookingNumberAddress_InternationalPort] FOREIGN KEY ([InternationalPortFID]) REFERENCES [dbo].[InternationalPort] ([InternationalPortID])
GO
GRANT SELECT ON  [dbo].[InternationalBookingNumberAddress] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalBookingNumberAddress] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalBookingNumberAddress] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalBookingNumberAddress] TO [MssExec]
GO
Uses
Used By