Sales.CustomerAddress Table

Information

NameCustomerAddress
SchemaSales
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:54

Extended Properties

NameTypeProperty NameValue
CustomerAddressTABLEMS_DescriptionCross-reference table mapping customers to their address(es).

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   CustomerIDint  Sales.Customer.CustomerID
 
 
 
   AddressIDint  Person.Address.AddressID
 
 
 
   AddressTypeIDint  Person.AddressType.AddressTypeID
 
 
 
   rowguiduniqueidentifier   
(newid())
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_CustomerAddress_CustomerID_AddressIDClustered  CustomerID, AddressID
AK_CustomerAddress_rowguidNonClustered  rowguid

Foreign Key Constraints

NameTypeReferenced Table
FK_CustomerAddress_Address_AddressIDForeign keyPerson.Address
FK_CustomerAddress_AddressType_AddressTypeIDForeign keyPerson.AddressType
FK_CustomerAddress_Customer_CustomerIDForeign keySales.Customer

SQL Script

CREATE TABLE [Sales].[CustomerAddress] (
    [CustomerID] int NOT NULL,
    [AddressID] int NOT NULL,
    [AddressTypeID] int NOT NULL,
    [rowguid] uniqueidentifier NOT NULL DEFAULT (newid()),
    [ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);
CREATE UNIQUE INDEX [AK_CustomerAddress_rowguid] on [Sales].[CustomerAddress]([rowguid]);