Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check |
---|---|---|---|---|---|---|---|
CustomerID | int identity | 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 | varchar | 10 | Not null | Unique number identifying the customer assigned by the accounting system. | |||
CustomerType | nchar | 1 | Not null | Customer type: I = Individual, S = Store | (upper([CustomerType])='I' OR upper([CustomerType])='S') | ||
rowguid | uniqueidentifier | newid() | Not null | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | |||
ModifiedDate | datetime | getdate() | Not null | Date and time the record was last updated. |
The object has no extended properties.
Primary Key Name | Field Name |
---|---|
PK_Customer_CustomerID | CustomerID |
Foreign | Primary | Key Name |
---|---|---|
Customer.TerritoryID | SalesTerritory.TerritoryID | FK_Customer_SalesTerritory_TerritoryID |
Index Name | Description | Clustered | Unique | Fields |
---|---|---|---|---|
PK_Customer_CustomerID | Clustered index created by a primary key constraint. | Yes | Yes | CustomerID |
AK_Customer_AccountNumber | Unique nonclustered index. | No | Yes | AccountNumber |
AK_Customer_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid |
IX_Customer_TerritoryID | Nonclustered index. | No | No | TerritoryID |
Name | Description | Type | Enabled |
---|---|---|---|
uCustomer | AFTER UPDATE trigger setting the ModifiedDate column in the Customer table to the current date. | after Update | Yes |
Object Name | Type | Field Name |
---|---|---|
dbo.ufnLeadingZeros | scalar function | N/A |
Sales.Customer | user table | CustomerID |