Properties

Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 864 
Index Size KB: 552 
Rows: 19220 
Description: Cross-reference table mapping customers to their address(es). 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    CustomerID  int          Primary key. Foreign key to Customer.CustomerID. 
    AddressID  int          Primary key. Foreign key to Address.AddressID. 
    AddressTypeID  int          Address type. Foreign key to AddressType.AddressTypeID. 
    rowguid  uniqueidentifier  16    (newid())      ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 5 column(s)

Indexes

Index Primary Unique Description
  PK_CustomerAddress_CustomerID_AddressID      Primary key (clustered) constraint 
  AK_CustomerAddress_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 2 index(es)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Person.Address  FK_CustomerAddress_Address_AddressID  PK_Address_AddressID 
  Person.AddressType  FK_CustomerAddress_AddressType_AddressTypeID  PK_AddressType_AddressTypeID 
  Sales.Customer  FK_CustomerAddress_Customer_CustomerID  PK_Customer_CustomerID 
Total: 3 table(s)

Objects that [Sales].[CustomerAddress] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  ufnLeadingZeros  dbo  Function 
  AddressType  Person  Table 
  CountryRegion  Person  Table 
  SalesTerritory  Sales  Table 
  Customer  Sales  Table 
  StateProvince  Person  Table 
  Address  Person  Table 
Total: 9 object(s)

Objects that depend on [Sales].[CustomerAddress]

Object Name Owner Object Type Dep Level
  vIndividualCustomer  Sales  View 
  vStoreWithDemographics  Sales  View 
Total: 2 object(s)

SQL

CREATE TABLE [CustomerAddress] (
    [CustomerID] [int] NOT NULL ,
    [AddressID] [int] NOT NULL ,
    [AddressTypeID] [int] NOT NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_CustomerAddress_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_CustomerAddress_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_CustomerAddress_CustomerID_AddressID] PRIMARY KEY  CLUSTERED
    (
        [CustomerID],
        [AddressID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_CustomerAddress_Address_AddressID] FOREIGN KEY
    (
        [AddressID]
    ) REFERENCES [Address] (
        [AddressID]
    ),
    CONSTRAINT [FK_CustomerAddress_AddressType_AddressTypeID] FOREIGN KEY
    (
        [AddressTypeID]
    ) REFERENCES [AddressType] (
        [AddressTypeID]
    ),
    CONSTRAINT [FK_CustomerAddress_Customer_CustomerID] FOREIGN KEY
    (
        [CustomerID]
    ) REFERENCES [Customer] (
        [CustomerID]
    )
) ON [PRIMARY]
GO


See Also

List of tables