Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB:
Index Size KB: 40 
Rows: 10 
Description: Sales territory lookup table. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    TerritoryID  int          Primary key for SalesTerritory records. 
    Name  Name  100          Sales territory description 
    CountryRegionCode  nvarchar          ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode.  
    Group  nvarchar  50          Geographic area to which the sales territory belong. 
    SalesYTD  money    ((0.00))      Sales in the territory year to date. 
    SalesLastYear  money    ((0.00))      Sales in the territory the previous year. 
    CostYTD  money    ((0.00))      Business costs in the territory year to date. 
    CostLastYear  money    ((0.00))      Business costs in the territory the previous year. 
    rowguid  uniqueidentifier  16    (newid())      ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 10 column(s)

Identity column

Name Seed Increment Not for replication


Index Primary Unique Description
  PK_SalesTerritory_TerritoryID      Primary key (clustered) constraint 
  AK_SalesTerritory_Name      Unique nonclustered index. 
  AK_SalesTerritory_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 3 index(es)

Check Constraints

Name Expression
  CK_SalesTerritory_CostLastYear  ([CostLastYear]>=(0.00)) 
  CK_SalesTerritory_CostYTD  ([CostYTD]>=(0.00)) 
  CK_SalesTerritory_SalesLastYear  ([SalesLastYear]>=(0.00)) 
  CK_SalesTerritory_SalesYTD  ([SalesYTD]>=(0.00)) 
Total: 4 constraint(s)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.SalesOrderHeader  FK_SalesOrderHeader_SalesTerritory_TerritoryID  PK_SalesTerritory_TerritoryID 
  Sales.SalesPerson  FK_SalesPerson_SalesTerritory_TerritoryID  PK_SalesTerritory_TerritoryID 
  Sales.SalesTerritoryHistory  FK_SalesTerritoryHistory_SalesTerritory_TerritoryID  PK_SalesTerritory_TerritoryID 
  Person.StateProvince  FK_StateProvince_SalesTerritory_TerritoryID  PK_SalesTerritory_TerritoryID 
  Sales.Customer  FK_Customer_SalesTerritory_TerritoryID  PK_SalesTerritory_TerritoryID 
Total: 5 table(s)

Objects that [Sales].[SalesTerritory] depends on

Object Name Owner Object Type Dep Level
  Name  dbo  User Defined type 
Total: 1 object(s)

Objects that depend on [Sales].[SalesTerritory]

Object Name Owner Object Type Dep Level
  Customer  Sales  Table 
  SalesPerson  Sales  Table 
  StateProvince  Person  Table 
  vStateProvinceCountryRegion  Person  View 
  Address  Person  Table 
  Individual  Sales  Table 
  SalesPersonQuotaHistory  Sales  Table 
  SalesTaxRate  Sales  Table 
  SalesTerritoryHistory  Sales  Table 
  Store  Sales  Table 
  vIndividualDemographics  Sales  View 
  CustomerAddress  Sales  Table 
  EmployeeAddress  HumanResources  Table 
  SalesOrderHeader  Sales  Table 
  StoreContact  Sales  Table 
  VendorAddress  Purchasing  Table 
  iStore  Sales  Trigger 
  iuIndividual  Sales  Trigger 
  ufnGetContactInformation  dbo  Function 
  vEmployee  HumanResources  View 
  vIndividualCustomer  Sales  View 
  vSalesPerson  Sales  View 
  vSalesPersonSalesByFiscalYears  Sales  View 
  vStoreWithDemographics  Sales  View 
  vVendor  Purchasing  View 
  SalesOrderDetail  Sales  Table 
  SalesOrderHeaderSalesReason  Sales  Table 
  uSalesOrderHeader  Sales  Trigger 
  iduSalesOrderDetail  Sales  Trigger 
Total: 29 object(s)


CREATE TABLE [SalesTerritory] (
    [TerritoryID] [int] IDENTITY (1, 1) NOT NULL ,
    [Name] [Name] NOT NULL ,
    [CountryRegionCode] [nvarchar] (3) COLLATE Latin1_General_CS_AS NOT NULL ,
    [Group] [nvarchar] (50) COLLATE Latin1_General_CS_AS NOT NULL ,
    [SalesYTD] [money] NOT NULL CONSTRAINT [DF_SalesTerritory_SalesYTD] DEFAULT ((0.00)),
    [SalesLastYear] [money] NOT NULL CONSTRAINT [DF_SalesTerritory_SalesLastYear] DEFAULT ((0.00)),
    [CostYTD] [money] NOT NULL CONSTRAINT [DF_SalesTerritory_CostYTD] DEFAULT ((0.00)),
    [CostLastYear] [money] NOT NULL CONSTRAINT [DF_SalesTerritory_CostLastYear] DEFAULT ((0.00)),
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_SalesTerritory_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_SalesTerritory_ModifiedDate] DEFAULT (getdate()),
    )  ON [PRIMARY] ,
    CONSTRAINT [CK_SalesTerritory_CostLastYear] CHECK ([CostLastYear]>=(0.00)),
    CONSTRAINT [CK_SalesTerritory_CostYTD] CHECK ([CostYTD]>=(0.00)),
    CONSTRAINT [CK_SalesTerritory_SalesLastYear] CHECK ([SalesLastYear]>=(0.00)),
    CONSTRAINT [CK_SalesTerritory_SalesYTD] CHECK ([SalesYTD]>=(0.00))

See Also

List of tables