Editing Sales.Customer (table)

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|- valign="top"
+
|-
 
| '''Table
 
| '''Table
 
| Sales.Customer
 
| Sales.Customer
|- valign="top"
+
|-
| '''Description
 
| Current customer information. Also see the Individual and Store tables.
 
 
|}
 
|}
  
=== Columns ===
+
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 17: Line 15:
 
| '''Nullable
 
| '''Nullable
 
| '''Default
 
| '''Default
| '''Description
+
| '''PK
 
+
| '''Index
|- valign="top"
+
 +
|-
 
| CustomerID
 
| CustomerID
 
| int
 
| int
 
| not null
 
| not null
 
|  
 
|  
| Primary key for Customer records.
+
| PK_Customer_CustomerID
|- valign="top"
+
|
 +
|-
 
| TerritoryID
 
| TerritoryID
 
| int
 
| int
 
| null
 
| null
 
|  
 
|  
| ID of the territory in which the customer is located. Foreign key to SalesTerritory.SalesTerritoryID.
+
|  
|- valign="top"
+
| IX_Customer_TerritoryID
 +
|-
 
| AccountNumber
 
| AccountNumber
 
|  
 
|  
 
|  
 
|  
 
|  
 
|  
| Unique number identifying the customer assigned by the accounting system.
+
|  
|- valign="top"
+
| AK_Customer_AccountNumber
 +
|-
 
| CustomerType
 
| CustomerType
 
| nchar(1)
 
| nchar(1)
 
| not null
 
| not null
 
|  
 
|  
| Customer type: I = Individual, S = Store
+
|  
|- valign="top"
+
|
 +
|-
 
| rowguid
 
| rowguid
 
| uniqueidentifier
 
| uniqueidentifier
 
| not null
 
| not null
 
| (newid())
 
| (newid())
| ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
+
|  
|- valign="top"
+
| AK_Customer_rowguid
 +
|-
 
| ModifiedDate
 
| ModifiedDate
 
| datetime
 
| datetime
 
| not null
 
| not null
 
| (getdate())
 
| (getdate())
| Date and time the record was last updated.
 
|}
 
 
=== Primary Key ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Primary Key
 
| '''Columns
 
|- valign="top"
 
| PK_Customer_CustomerID
 
| CustomerID
 
|}
 
 
=== Indexes ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Index
 
| '''Type
 
| '''Columns
 
 
|- valign="top"
 
| AK_Customer_AccountNumber
 
| Unique
 
| AccountNumber
 
|- valign="top"
 
| AK_Customer_rowguid
 
| Unique
 
| rowguid
 
|- valign="top"
 
| IX_Customer_TerritoryID
 
 
|  
 
|  
| TerritoryID
+
|  
 
|}
 
|}
  
=== Check Constraints ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Check Constraint
 
| '''Expression
 
| '''Description
 
  
|- valign="top"
 
| 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 ===
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 107: Line 69:
 
| '''Column
 
| '''Column
 
| '''Referenced Column
 
| '''Referenced Column
 
+
|- valign="top"
+
|-
 
| [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]]
 
| [[Sales.SalesTerritory_(table)|Sales.SalesTerritory]]
 
| TerritoryID
 
| TerritoryID
Line 114: Line 76:
 
|}
 
|}
  
=== Detail Tables ===
+
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
Line 120: Line 82:
 
| '''Column
 
| '''Column
 
| '''Referencing Column
 
| '''Referencing Column
 
+
|- valign="top"
+
|-
 
| [[Sales.CustomerAddress_(table)|Sales.CustomerAddress]]
 
| [[Sales.CustomerAddress_(table)|Sales.CustomerAddress]]
 
| CustomerID
 
| CustomerID
 
| CustomerID
 
| CustomerID
|- valign="top"
+
|-
 
| [[Sales.Individual_(table)|Sales.Individual]]
 
| [[Sales.Individual_(table)|Sales.Individual]]
 
| CustomerID
 
| CustomerID
 
| CustomerID
 
| CustomerID
|- valign="top"
+
|-
 
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]]
 
| [[Sales.SalesOrderHeader_(table)|Sales.SalesOrderHeader]]
 
| CustomerID
 
| CustomerID
 
| CustomerID
 
| CustomerID
|- valign="top"
+
|-
 
| [[Sales.Store_(table)|Sales.Store]]
 
| [[Sales.Store_(table)|Sales.Store]]
 
| CustomerID
 
| CustomerID
 
| CustomerID
 
| CustomerID
 
|}
 
|}
 
=== References ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Dependency Type
 
| '''Object Type
 
| '''Referenced Object
 
 
|- valign="top"
 
| Schema
 
| Schema
 
| [[Sales_(schema)|Sales]]
 
 
|}
 
 
=== Dependencies ===
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
| '''Reference Type
 
| '''Object Type
 
| '''Referencing Object
 
 
|- valign="top"
 
| Select
 
| View
 
| [[Sales.vIndividualCustomer_(view)|Sales.vIndividualCustomer]]
 
 
|- valign="top"
 
| Select
 
| View
 
| [[Sales.vStoreWithDemographics_(view)|Sales.vStoreWithDemographics]]
 
 
|}
 
 
 
 
== automatically generated ==
 
== automatically generated ==
  
Line 180: Line 107:
 
| Sales.Customer
 
| Sales.Customer
 
|- valign="top"
 
|- valign="top"
 +
 
| '''Description
 
| '''Description
 
| Current customer information. Also see the Individual and Store tables.
 
| Current customer information. Also see the Individual and Store tables.
 
|-
 
|-
 +
 
|}
 
|}
  
Line 274: Line 203:
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
| '''Dependency Type
+
| '''Referencing Object
 
| '''Object Type
 
| '''Object Type
| '''Referenced Object
 
 
|-
 
| Schema
 
| Schema
 
| [[Sales_(schema)|Sales]]
 
 
|}
 
 
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
 
| '''Reference Type
 
| '''Reference Type
| '''Object Type
+
| '''Referencing Object
 
 
 
 
|-
 
|-
 +
| [[Sales.vIndividualCustomer_(view)|Sales.vIndividualCustomer]]
 +
| View
 
| Select
 
| Select
 +
|-
 +
| [[Sales.vStoreWithDemographics_(view)|Sales.vStoreWithDemographics]]
 
| View
 
| View
| [[Sales.vIndividualCustomer_(view)|Sales.vIndividualCustomer]]
 
 
|-
 
 
| Select
 
| Select
| View
 
| [[Sales.vStoreWithDemographics_(view)|Sales.vStoreWithDemographics]]
 
 
 
|}
 
|}

Please note that all contributions to dbscript Online Help may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)