Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check |
---|---|---|---|---|---|---|---|
SalesPersonID | int | Not null | Primary key for SalesTerritoryHistory records. | ||||
TerritoryID | int | Not null | Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID. | ||||
StartDate | datetime | Not null | Date the sales representive started work in the territory. | ||||
EndDate | datetime | Null | Date the sales representative left work in the territory. | ||||
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 Names |
---|---|
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | SalesPersonID, StartDate, TerritoryID |
Foreign | Primary | Key Name |
---|---|---|
SalesTerritoryHistory.SalesPersonID | SalesPerson.SalesPersonID | FK_SalesTerritoryHistory_SalesPerson_SalesPersonID |
SalesTerritoryHistory.TerritoryID | SalesTerritory.TerritoryID | FK_SalesTerritoryHistory_SalesTerritory_TerritoryID |
Index Name | Description | Clustered | Unique | Fields |
---|---|---|---|---|
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | Clustered index created by a primary key constraint. | Yes | Yes | SalesPersonID, StartDate, TerritoryID |
AK_SalesTerritoryHistory_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid |
Name | Description | Type | Enabled |
---|---|---|---|
uSalesTerritoryHistory | AFTER UPDATE trigger setting the ModifiedDate column in the SalesTerritoryHistory table to the current date. | after Update | Yes |
Object Name | Type | Field Name |
---|---|---|
Sales.CK_SalesTerritoryHistory_EndDate | check cns | N/A |
Sales.uSalesTerritoryHistory | trigger | N/A |