Sales.SalesTerritoryHistory

Table: 'Sales.SalesTerritoryHistory'

6 fields. 72 bytes.

Sales representative transfers to other sales territories.

Field NameData TypeSizeOriginal TypeDefaultNullableDescriptionCheck
SalesPersonIDint   Not nullPrimary key for SalesTerritoryHistory records. 
TerritoryIDint   Not nullTerritory identification number. Foreign key to SalesTerritory.SalesTerritoryID. 
StartDatedatetime   Not nullDate the sales representive started work in the territory. 
EndDatedatetime   NullDate the sales representative left work in the territory. 
rowguiduniqueidentifier  newid()Not nullROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
ModifiedDatedatetime  getdate()Not nullDate and time the record was last updated. 

Extended Properties

The object has no extended properties.

Primary key for table 'Sales.SalesTerritoryHistory'

Primary Key NameField Names
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryIDSalesPersonID, StartDate, TerritoryID

Foreign keys for table 'Sales.SalesTerritoryHistory', 2 items

ForeignPrimaryKey Name
SalesTerritoryHistory.SalesPersonIDSalesPerson.SalesPersonIDFK_SalesTerritoryHistory_SalesPerson_SalesPersonID
SalesTerritoryHistory.TerritoryIDSalesTerritory.TerritoryIDFK_SalesTerritoryHistory_SalesTerritory_TerritoryID

Indexes for table 'Sales.SalesTerritoryHistory', 2 items

Index NameDescriptionClusteredUniqueFields
PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryIDClustered index created by a primary key constraint.YesYesSalesPersonID, StartDate, TerritoryID
AK_SalesTerritoryHistory_rowguidUnique nonclustered index. Used to support replication samples.NoYesrowguid

Triggers for table 'Sales.SalesTerritoryHistory', 1 item

NameDescriptionTypeEnabled
uSalesTerritoryHistoryAFTER UPDATE trigger setting the ModifiedDate column in the SalesTerritoryHistory table to the current date.after Update Yes

Dependencies for table 'Sales.SalesTerritoryHistory', 2 items

Object NameTypeField Name
Sales.CK_SalesTerritoryHistory_EndDatecheck cnsN/A
Sales.uSalesTerritoryHistorytriggerN/A