Owner: | Sales |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 16 |
Index Size KB: | 32 |
Rows: | 163 |
Description: | Sales performance tracking. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
SalesPersonID | int | 4 | Sales person identification number. Foreign key to SalesPerson.SalesPersonID. | ||||||
QuotaDate | datetime | 8 | Sales quota date. | ||||||
SalesQuota | money | 8 | Sales quota amount. | ||||||
rowguid | uniqueidentifier | 16 | (newid()) | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | |||||
ModifiedDate | datetime | 8 | (getdate()) | Date and time the record was last updated. |
Index | Primary | Unique | Description | |
PK_SalesPersonQuotaHistory_SalesPersonID_QuotaDate | Primary key (clustered) constraint | |||
AK_SalesPersonQuotaHistory_rowguid | Unique nonclustered index. Used to support replication samples. |
Name | Expression | |
CK_SalesPersonQuotaHistory_SalesQuota | ([SalesQuota]>(0.00)) |
Table | Foreign Key | Primary Key or Unique Constraint | |
Sales.SalesPerson | FK_SalesPersonQuotaHistory_SalesPerson_SalesPersonID | PK_SalesPerson_SalesPersonID |
Objects that [Sales].[SalesPersonQuotaHistory] depends on
Object Name | Owner | Object Type | Dep Level | |
Flag | dbo | User Defined type | 1 | |
Name | dbo | User Defined type | 1 | |
NameStyle | dbo | User Defined type | 1 | |
Phone | dbo | User Defined type | 1 | |
Contact | Person | Table | 2 | |
SalesTerritory | Sales | Table | 2 | |
Employee | HumanResources | Table | 3 | |
SalesPerson | Sales | Table | 4 |
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