Tables SQL 2005 Adventure Works OLTP

HumanResources.EmployeePayHistory

Object type: Table

Employee pay history.

Columns 

Name  Data type  Nullable  Description 
EmployeeID  int  No Employee identification number. Foreign key to Employee.EmployeeID. 
RateChangeDate  datetime  No Date the change in pay is effective 
Rate  money  No Salary hourly rate. 
PayFrequency  tinyint  No 1 = Salary received monthly, 2 = Salary received biweekly 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_EmployeePayHistory_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
CK_EmployeePayHistory_PayFrequency  CHECK  N/A  Value: ([PayFrequency] IN (1, 2) )
Check constraint [PayFrequency]=(3) OR [PayFrequency]=(2) OR [PayFrequency]=(1) 
CK_EmployeePayHistory_Rate  CHECK  N/A  Value: ([Rate] BETWEEN 6.50 AND 200.00)
Check constraint [Rate]>=(6.50) AND [Rate]<=(200.00) 
PK_EmployeePayHistory_EmployeeID_RateChangeDate  PRIMARY KEY  EmployeeID
RateChangeDate 
Clustered index created by a primary key constraint. 
FK_EmployeePayHistory_Employee_EmployeeID  FOREIGN KEY  EmployeeID  Reference table: HumanResources.Employee
Foreign key constraint referencing Employee.EmployeeID. 

Triggers 

Name  Description 
HumanResources.uEmployeePayHistory  AFTER UPDATE trigger setting the ModifiedDate column in the EmployeePayHistory table to the current date. 

Modified by 

Name  Description 
HumanResources.uEmployeePayHistory  AFTER UPDATE trigger setting the ModifiedDate column in the EmployeePayHistory table to the current date. 
HumanResources.uspUpdateEmployeeHireInfo  Updates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters. 

Applies to

Tables | User
The AdventureWorks database sample was developed by Microsoft Corporation, copyright 2005. SQL Server is a trademark of Microsoft Corporation

Document was prepared on: Thursday, April 05, 2007
Help compiled by DBDocumentor, a Pikauba Software product. All rights reserved.