Tables [dbo].[MilitaryCarrierContactAddress]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)0
Created10:11:25 PM Wednesday, October 25, 2006
Last Modified1:51:39 PM Wednesday, April 10, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_MilitaryCarrierContactAddress: MilitaryCarrierContactAddressIDMilitaryCarrierContactAddressIDint4
No
1 - 1
Foreign Keys FK_MilitaryCarrierContactAddress_MilitaryCarrierContact: [dbo].[MilitaryCarrierContact].MilitaryCarrierContactFIDIndexes IX_MilitaryCarrierContactAddress_AddressType: MilitaryCarrierContactFID\AddressTypeFIDMilitaryCarrierContactFIDint4
No
Foreign Keys FK_MilitaryCarrierContactAddress_AddressType: [dbo].[AddressType].AddressTypeFIDCheck Constraints CK_MilitaryCarrierContactAddress_AddressType : ([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')Indexes IX_MilitaryCarrierContactAddress_AddressType: MilitaryCarrierContactFID\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_MilitaryCarrierContactAddress_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_MilitaryCarrierContactAddress: MilitaryCarrierContactAddressIDPK_MilitaryCarrierContactAddressMilitaryCarrierContactAddressID
Yes
80
IX_MilitaryCarrierContactAddress_AddressTypeMilitaryCarrierContactFID, AddressTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_MilitaryCarrierContactAddress_AddressTypeAddressTypeFID([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryCarrierContactAddress_AddressTypeAddressTypeFID->[dbo].[AddressType].[AddressTypeID]
FK_MilitaryCarrierContactAddress_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_MilitaryCarrierContactAddress_MilitaryCarrierContactCascadeMilitaryCarrierContactFID->[dbo].[MilitaryCarrierContact].[MilitaryCarrierContactID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryCarrierContactAddress]
(
[MilitaryCarrierContactAddressID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryCarrierContactFID] [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].[MilitaryCarrierContactAddress] ADD CONSTRAINT [CK_MilitaryCarrierContactAddress_AddressType] CHECK (([dbo].[GetAddressTypeName]([AddressTypeFID])='Main'))
GO
ALTER TABLE [dbo].[MilitaryCarrierContactAddress] ADD CONSTRAINT [PK_MilitaryCarrierContactAddress] PRIMARY KEY NONCLUSTERED  ([MilitaryCarrierContactAddressID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContactAddress] ADD CONSTRAINT [IX_MilitaryCarrierContactAddress_AddressType] UNIQUE NONCLUSTERED  ([MilitaryCarrierContactFID], [AddressTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierContactAddress] ADD CONSTRAINT [FK_MilitaryCarrierContactAddress_AddressType] FOREIGN KEY ([AddressTypeFID]) REFERENCES [dbo].[AddressType] ([AddressTypeID])
GO
ALTER TABLE [dbo].[MilitaryCarrierContactAddress] ADD CONSTRAINT [FK_MilitaryCarrierContactAddress_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[MilitaryCarrierContactAddress] ADD CONSTRAINT [FK_MilitaryCarrierContactAddress_MilitaryCarrierContact] FOREIGN KEY ([MilitaryCarrierContactFID]) REFERENCES [dbo].[MilitaryCarrierContact] ([MilitaryCarrierContactID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[MilitaryCarrierContactAddress] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryCarrierContactAddress] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryCarrierContactAddress] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryCarrierContactAddress] TO [MssExec]
GO
Uses