Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check |
---|---|---|---|---|---|---|---|
SalesPersonID | int | Not null | Primary key for SalesPerson records. | ||||
TerritoryID | int | Null | Territory currently assigned to. Foreign key to SalesTerritory.SalesTerritoryID. | ||||
SalesQuota | money | 19,4 | decimal(19,4) | Null | Projected yearly sales. | ([SalesQuota]>(0.00)) | |
Bonus | money | 19,4 | decimal(19,4) | (0.00) | Not null | Bonus due if quota is met. | ([Bonus]>=(0.00)) |
CommissionPct | smallmoney | 10,4 | decimal(10,4) | (0.00) | Not null | Commision percent received per sale. | ([CommissionPct]>=(0.00)) |
SalesYTD | money | 19,4 | decimal(19,4) | (0.00) | Not null | Sales total year to date. | ([SalesYTD]>=(0.00)) |
SalesLastYear | money | 19,4 | decimal(19,4) | (0.00) | Not null | Sales total of previous year. | ([SalesLastYear]>=(0.00)) |
rowguid | uniqueidentifier | newid() | Not null | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | |||
ModifiedDate | datetime | getdate() | Not null | Date and time the record was last updated. |
The object has no extended properties.
Primary Key Name | Field Name |
---|---|
PK_SalesPerson_SalesPersonID | SalesPersonID |
Foreign | Primary | Key Name |
---|---|---|
SalesPerson.SalesPersonID | Employee.EmployeeID | FK_SalesPerson_Employee_SalesPersonID |
SalesPerson.TerritoryID | SalesTerritory.TerritoryID | FK_SalesPerson_SalesTerritory_TerritoryID |
Index Name | Description | Clustered | Unique | Fields |
---|---|---|---|---|
PK_SalesPerson_SalesPersonID | Clustered index created by a primary key constraint. | Yes | Yes | SalesPersonID |
AK_SalesPerson_rowguid | Unique nonclustered index. Used to support replication samples. | No | Yes | rowguid |
Name | Description | Type | Enabled |
---|---|---|---|
uSalesPerson | AFTER UPDATE trigger setting the ModifiedDate column in the SalesPerson table to the current date. | after Update | Yes |
Object Name | Type | Field Name |
---|---|---|
Sales.CK_SalesPerson_Bonus | check cns | N/A |
Sales.CK_SalesPerson_CommissionPct | check cns | N/A |
Sales.CK_SalesPerson_SalesLastYear | check cns | N/A |
Sales.CK_SalesPerson_SalesQuota | check cns | N/A |
Sales.CK_SalesPerson_SalesYTD | check cns | N/A |
Sales.uSalesOrderHeader | trigger | N/A |
Sales.uSalesPerson | trigger | N/A |
Sales.vSalesPerson | view | N/A |
Sales.vSalesPersonSalesByFiscalYears | view | N/A |