ScrewTurn Wiki

Edit

wikibot

TableSales.Customer
DescriptionCurrent customer information. Also see the Individual and Store tables.

Edit

Columns

ColumnData TypeNullableDefaultDescription
CustomerIDintnot null Primary key for Customer records.
TerritoryIDintnull 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.
CustomerTypenchar(1)not null Customer type: I = Individual, S = Store
rowguiduniqueidentifiernot null(newid())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
ModifiedDatedatetimenot null(getdate())Date and time the record was last updated.

Edit

Primary Key

Primary KeyColumns
PK_Customer_CustomerIDCustomerID

Edit

Indexes

IndexTypeColumns
AK_Customer_AccountNumberUniqueAccountNumber
AK_Customer_rowguidUniquerowguid
IX_Customer_TerritoryID TerritoryID

Edit

Check Constraints

Check ConstraintExpressionDescription
CK_Customer_CustomerType(upper(CustomerType)='I' OR upper(CustomerType)='S')Check constraint CustomerType='I' OR CustomerType='i' OR CustomerType='S' OR CustomerType='s'

Edit

Foreign Keys

RelationColumnReferenced Column
Sales.SalesTerritoryTerritoryIDTerritoryID

Edit

Detail Tables

Detail TableColumnReferencing Column
Sales.CustomerAddressCustomerIDCustomerID
Sales.IndividualCustomerIDCustomerID
Sales.SalesOrderHeaderCustomerIDCustomerID
Sales.StoreCustomerIDCustomerID

Edit

References

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

Edit

Dependencies

Reference TypeObject TypeReferencing Object
SelectViewSales.vIndividualCustomer
SelectViewSales.vStoreWithDemographics

Edit

automatically generated

TableSales.Customer
DescriptionCurrent customer information. Also see the Individual and Store tables.

ColumnData TypeNullableDefaultDescription / PK / Index
CustomerIDintnot null Primary key for Customer records.
PK_Customer_CustomerID
TerritoryIDintnull 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
CustomerTypenchar(1)not null Customer type: I = Individual, S = Store
rowguiduniqueidentifiernot null(NEWID())ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
AK_Customer_rowguid
ModifiedDatedatetimenot null(GETDATE())Date and time the record was last updated.



RelationColumnReferenced Column
Sales.SalesTerritoryTerritoryIDTerritoryID

Detail TableColumnReferencing Column
Sales.CustomerAddressCustomerIDCustomerID
Sales.IndividualCustomerIDCustomerID
Sales.SalesOrderHeaderCustomerIDCustomerID
Sales.StoreCustomerIDCustomerID

Dependency TypeObject TypeReferenced Object
SchemaSchemaSales

Reference TypeObject TypeReferencing Object
SelectViewSales.vIndividualCustomer
SelectViewSales.vStoreWithDemographics

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.