Tables [dbo].[MilitaryCarrierAddress]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)914
Created10:11:25 PM Wednesday, October 25, 2006
Last Modified11:13:40 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Primary Key PK_MilitaryCarrierAddress: MilitaryCarrierAddressIDMilitaryCarrierAddressIDint4
No
1 - 1
Foreign Keys FK_MilitaryCarrierAddress_MilitaryCarrier: [dbo].[MilitaryCarrier].MilitaryCarrierFIDIndexes IX_MilitaryCarrierAddress_AddressType: MilitaryCarrierFID\AddressTypeFIDMilitaryCarrierFIDint4
No
Foreign Keys FK_MilitaryCarrierAddress_AddressType: [dbo].[AddressType].AddressTypeFIDCheck Constraints CK_MilitaryCarrierAddress_AddressType : ([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')Indexes IX_MilitaryCarrierAddress_AddressType: MilitaryCarrierFID\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_MilitaryCarrierAddress_CountryCodeStandard: [dbo].[CountryCodeStandard].CountryCodeStandardFIDCountryCodeStandardFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_MilitaryCarrierAddress: MilitaryCarrierAddressIDPK_MilitaryCarrierAddressMilitaryCarrierAddressID
Yes
80
IX_MilitaryCarrierAddress_AddressTypeMilitaryCarrierFID, AddressTypeFID
Yes
80
Check Constraints Check Constraints
NameOn ColumnConstraint
CK_MilitaryCarrierAddress_AddressTypeAddressTypeFID([dbo].[GetAddressTypeName]([AddressTypeFID])='Main')
Foreign Keys Foreign Keys
NameDeleteColumns
FK_MilitaryCarrierAddress_AddressTypeAddressTypeFID->[dbo].[AddressType].[AddressTypeID]
FK_MilitaryCarrierAddress_CountryCodeStandardCountryCodeStandardFID->[dbo].[CountryCodeStandard].[CountryCodeStandardID]
FK_MilitaryCarrierAddress_MilitaryCarrierCascadeMilitaryCarrierFID->[dbo].[MilitaryCarrier].[MilitaryCarrierID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[MilitaryCarrierAddress]
(
[MilitaryCarrierAddressID] [int] NOT NULL IDENTITY(1, 1),
[MilitaryCarrierFID] [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].[MilitaryCarrierAddress] ADD CONSTRAINT [CK_MilitaryCarrierAddress_AddressType] CHECK (([dbo].[GetAddressTypeName]([AddressTypeFID])='Main'))
GO
ALTER TABLE [dbo].[MilitaryCarrierAddress] ADD CONSTRAINT [PK_MilitaryCarrierAddress] PRIMARY KEY NONCLUSTERED  ([MilitaryCarrierAddressID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierAddress] ADD CONSTRAINT [IX_MilitaryCarrierAddress_AddressType] UNIQUE NONCLUSTERED  ([MilitaryCarrierFID], [AddressTypeFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MilitaryCarrierAddress] ADD CONSTRAINT [FK_MilitaryCarrierAddress_AddressType] FOREIGN KEY ([AddressTypeFID]) REFERENCES [dbo].[AddressType] ([AddressTypeID])
GO
ALTER TABLE [dbo].[MilitaryCarrierAddress] ADD CONSTRAINT [FK_MilitaryCarrierAddress_CountryCodeStandard] FOREIGN KEY ([CountryCodeStandardFID]) REFERENCES [dbo].[CountryCodeStandard] ([CountryCodeStandardID])
GO
ALTER TABLE [dbo].[MilitaryCarrierAddress] ADD CONSTRAINT [FK_MilitaryCarrierAddress_MilitaryCarrier] FOREIGN KEY ([MilitaryCarrierFID]) REFERENCES [dbo].[MilitaryCarrier] ([MilitaryCarrierID]) ON DELETE CASCADE
GO
GRANT SELECT ON  [dbo].[MilitaryCarrierAddress] TO [MssExec]
GRANT INSERT ON  [dbo].[MilitaryCarrierAddress] TO [MssExec]
GRANT DELETE ON  [dbo].[MilitaryCarrierAddress] TO [MssExec]
GRANT UPDATE ON  [dbo].[MilitaryCarrierAddress] TO [MssExec]
GO
Uses