From dbscript Online Help
wikibot
Table
|
Sales.Customer
|
Description
|
Current customer information. Also see the Individual and Store tables.
|
Columns
Column
|
Data Type
|
Nullable
|
Default
|
Description
|
CustomerID
|
int
|
not null
|
|
Primary key for Customer records.
|
TerritoryID
|
int
|
null
|
|
ID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID.
|
AccountNumber
|
|
|
|
Unique number identifying the customer assigned by the accounting system.
|
CustomerType
|
nchar(1)
|
not null
|
|
Customer type: I = Individual, S = Store
|
rowguid
|
uniqueidentifier
|
not null
|
(newid())
|
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
|
ModifiedDate
|
datetime
|
not null
|
(getdate())
|
Date and time the record was last updated.
|
Primary Key
Primary Key
|
Columns
|
PK_Customer_CustomerID
|
CustomerID
|
Indexes
Index
|
Type
|
Columns
|
AK_Customer_AccountNumber
|
Unique
|
AccountNumber
|
AK_Customer_rowguid
|
Unique
|
rowguid
|
IX_Customer_TerritoryID
|
|
TerritoryID
|
Check Constraints
Check Constraint
|
Expression
|
Description
|
CK_Customer_CustomerType
|
(upper([CustomerType])='I' OR upper([CustomerType])='S')
|
Check constraint [CustomerType]='I' OR [CustomerType]='i' OR [CustomerType]='S' OR [CustomerType]='s'
|
Foreign Keys
Detail Tables
References
Dependency Type
|
Object Type
|
Referenced Object
|
Schema
|
Schema
|
Sales
|
Dependencies
automatically generated
Table
|
Sales.Customer
|
Description
|
Current customer information. Also see the Individual and Store tables.
|
Column
|
Data Type
|
Nullable
|
Default
|
Description / PK / Index
|
CustomerID
|
int
|
not null
|
|
Primary key for Customer records. PK_Customer_CustomerID
|
TerritoryID
|
int
|
null
|
|
ID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID. IX_Customer_TerritoryID
|
AccountNumber
|
|
|
|
Unique number identifying the customer assigned by the accounting system. AK_Customer_AccountNumber
|
CustomerType
|
nchar(1)
|
not null
|
|
Customer type: I = Individual, S = Store
|
rowguid
|
uniqueidentifier
|
not null
|
(NEWID())
|
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. AK_Customer_rowguid
|
ModifiedDate
|
datetime
|
not null
|
(GETDATE())
|
Date and time the record was last updated.
|
Dependency Type
|
Object Type
|
Referenced Object
|
Schema
|
Schema
|
Sales
|