Databases > AdventureWorks2019 > Tables > Sales.Customer

AdventureWorks2019

Sales.Customer

//
Current customer information. Also see the Person and Store tables.

Created: Modified:

Columns

  • //
    ${escapify(column.description)}
    CustomerID
    [int] IDENTITY (1,1) NOT NULL
  • //
    ${escapify(column.description)}
    PersonID
    [int] NULL
  • //
    ${escapify(column.description)}
    StoreID
    [int] NULL
  • //
    ${escapify(column.description)}
    TerritoryID
    [int] NULL
  • //
    ${escapify(column.description)}
    AccountNumber
    [varchar](10) NOT NULL
  • //
    ${escapify(column.description)}
    rowguid
    [uniqueidentifier] NOT NULL DEFAULT (newid())
  • //
    ${escapify(column.description)}
    ModifiedDate
    [datetime] NOT NULL DEFAULT (getdate())

Indexes

  • //
    Clustered index created by a primary key constraint.
    PK_Customer_CustomerID
    UNIQUE CLUSTERED
    CustomerID
  • //
    Unique nonclustered index. Used to support replication samples.
    AK_Customer_rowguid
    UNIQUE NONCLUSTERED
    rowguid
  • //
    Unique nonclustered index.
    AK_Customer_AccountNumber
    UNIQUE NONCLUSTERED
    AccountNumber
  • //
    Nonclustered index.
    IX_Customer_TerritoryID
    NONCLUSTERED
    TerritoryID

Foreign Keys

  • //
    Foreign key constraint referencing Person.BusinessEntityID.
    FK_Customer_Person_PersonID
    Person.Person
    PersonID ⥱ BusinessEntityID
  • //
    Foreign key constraint referencing SalesTerritory.TerritoryID.
    FK_Customer_SalesTerritory_TerritoryID
    Sales.SalesTerritory
    TerritoryID ⥱ TerritoryID
  • //
    Foreign key constraint referencing Store.BusinessEntityID.
    FK_Customer_Store_StoreID
    Sales.Store
    StoreID ⥱ BusinessEntityID

Sample Data

CustomerID
PersonID
StoreID
TerritoryID
AccountNumber
rowguid
ModifiedDate
1
NULL
934
1
AW00000001
3F5AE95E-B87D-4AED-95B4-C3797AFCB74F
2
NULL
1028
1
AW00000002
E552F657-A9AF-4A7D-A645-C429D6E02491
3
NULL
642
4
AW00000003
130774B1-DB21-4EF3-98C8-C104BCD6ED6D
4
NULL
932
4
AW00000004
FF862851-1DAA-4044-BE7C-3E85583C054D
5
NULL
1026
4
AW00000005
83905BDC-6F5E-4F71-B162-C98DA069F38A
6
NULL
644
4
AW00000006
1A92DF88-BFA2-467D-BD54-FCB9E647FDD7
7
NULL
930
1
AW00000007
03E9273E-B193-448E-9823-FE0C44AEED78
8
NULL
1024
5
AW00000008
801368B1-4323-4BFA-8BEA-5B5B1E4BD4A0
9
NULL
620
5
AW00000009
B900BB7F-23C3-481D-80DA-C49A5BD6F772
10
NULL
928
6
AW00000010
CDB6698D-2FF1-4FBA-8F22-60AD1D11DABD
11
NULL
1022
6
AW00000011
750F3495-59C4-48A0-80E1-E37EC60E77D9
12
NULL
622
6
AW00000012
947BCAF1-1F32-44F3-B9C3-0011F95FBE54
13
NULL
434
7
AW00000013
B0FA5854-2511-439B-A7AC-50C9C460B175
14
NULL
1020
8
AW00000014
2F96BEDC-723D-468F-834B-B2B8AE79C849
15
NULL
624
9
AW00000015
0340737B-D4FA-4795-93AA-CAEB8371BCF9
16
NULL
432
10
AW00000016
C9381589-D31C-4EFE-8978-8D3449EB1F0F
17
NULL
1018
5
AW00000017
34DB417F-1E0B-4408-9FF6-987E59D0D73C
18
NULL
1332
3
AW00000018
C04D6B4D-94C6-4C5C-A44C-B449C0AC1B45
19
NULL
430
1
AW00000019
69AE5D43-31BE-4B76-BFBB-5A23C4788BBC
20
NULL
1016
1
AW00000020
E010C10A-F1C3-4BBA-81CA-A7E083350400
21
NULL
1334
4
AW00000021
564E0B42-4609-43DE-9881-914DA433D82D
22
NULL
494
3
AW00000022
9774AED6-D673-412D-B481-2573E470B478
23
NULL
1014
4
AW00000023
733F8250-3251-4C2A-8C85-C285BB76B7B4
24
NULL
1336
4
AW00000024
C111E51D-178D-4DBD-A6FF-F1CCBF4B1AAD
25
NULL
492
4
AW00000025
31D03546-FB2A-4488-890E-4709A659E3F0