Properties

Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 16 
Index Size KB: 32 
Rows: 163 
Description: Sales performance tracking. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    SalesPersonID  int          Sales person identification number. Foreign key to SalesPerson.SalesPersonID. 
    QuotaDate  datetime          Sales quota date. 
    SalesQuota  money          Sales quota amount. 
    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: 5 column(s)

Indexes

Index Primary Unique Description
  PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDate      Primary key (clustered) constraint 
  AK_SalesPersonQuotaHistory_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 2 index(es)

Check Constraints

Name Expression
  CK_SalesPersonQuotaHistory_SalesQuota  ([SalesQuota]>(0.00)) 
Total: 1 constraint(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.SalesPerson  FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID  PK_SalesPerson_SalesPersonID 
Total: 1 table(s)

Objects that [Sales].[SalesPersonQuotaHistory] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  NameStyle  dbo  User Defined type 
  Phone  dbo  User Defined type 
  Contact  Person  Table 
  SalesTerritory  Sales  Table 
  Employee  HumanResources  Table 
  SalesPerson  Sales  Table 
Total: 8 object(s)

SQL

CREATE TABLE [SalesPersonQuotaHistory] (
    [SalesPersonID] [int] NOT NULL ,
    [QuotaDate] [datetime] NOT NULL ,
    [SalesQuota] [money] NOT NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_SalesPersonQuotaHistory_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_SalesPersonQuotaHistory_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDate] PRIMARY KEY  CLUSTERED
    (
        [SalesPersonID],
        [QuotaDate]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID] FOREIGN KEY
    (
        [SalesPersonID]
    ) REFERENCES [SalesPerson] (
        [SalesPersonID]
    ),
    CONSTRAINT [CK_SalesPersonQuotaHistory_SalesQuota] CHECK ([SalesQuota]>(0.00))
) ON [PRIMARY]
GO


See Also

List of tables