| AdventureWorks Database > Sales Schema : Sales.SalesTerritoryHistory Table |
| Creation Date | 08/01/2010 08:40 |
| File Group | PRIMARY |
| Text File Group | |
| System Object | ![]() |
| Published for Replication | ![]() |
| Rows | 17 |
| Data Space Used | 8.00 KB |
| Index Space Used | 24.00 KB |
| Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
|---|---|---|---|---|---|---|---|
| SalesPersonID | Primary key for SalesTerritoryHistory records. | int | 4 | |||
| TerritoryID | Territory identification number. Foreign key to SalesTerritory.SalesTerritoryID. | int | 4 | |||
| StartDate | Date the sales representive started work in the territory. | datetime | 4 | |||
| EndDate | Date the sales representative left work in the territory. | datetime | 4 | ![]() | |||
| rowguid | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | uniqueidentifier | 16 | (newid()) | |||
| ModifiedDate | Date and time the record was last updated. | datetime | 4 | (getdate()) |
| Index | Description | Primary | Unique |
|---|---|---|---|
| AK_SalesTerritoryHistory_rowguid | Unique nonclustered index. Used to support replication samples. | ![]() | |
| PK_SalesTerritoryHistory_SalesPersonID_StartDate_TerritoryID | Primary key (clustered) constraint | ![]() | ![]() |
| Name | Description | Expression |
|---|---|---|
| CK_SalesTerritoryHistory_EndDate | Check constraint [EndDate] >= [StartDate] OR [EndDate] IS NULL | ([EndDate]>=[StartDate] OR [EndDate] IS NULL) |
| Relationship | Description |
|---|---|
| FK_SalesTerritoryHistory_SalesPerson_SalesPersonID | Foreign key constraint referencing SalesPerson.SalesPersonID. |
| FK_SalesTerritoryHistory_SalesTerritory_TerritoryID | Foreign key constraint referencing SalesTerritory.TerritoryID. |
| Database Object | Object Type | Description | Dep Level | |
|---|---|---|---|---|
![]() | Person.Contact | Table | Names of each employee, customer contact, and vendor contact. | 3 |
![]() | HumanResources.Employee | Table | Employee information such as salary, department, and title. | 2 |
![]() | dbo.Flag | User Defined Data Type | 3 | |
![]() | dbo.NameStyle | User Defined Data Type | 4 | |
![]() | dbo.Phone | User Defined Data Type | 4 | |
![]() | Sales.SalesPerson | Table | Sales representative current information. | 1 |
![]() | Sales.SalesTerritory | Table | Sales territory lookup table. | 1 |
|