Tables SQL 2005 Adventure Works OLTP

Production.ProductListPriceHistory

Object type: Table

Changes in the list price of a product over time.

Columns 

Name  Data type  Nullable  Description 
ProductID  int  No Product identification number. Foreign key to Product.ProductID 
StartDate  datetime  No List price start date. 
EndDate  datetime  Yes List price end date 
ListPrice  money  No Product list price. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_ProductListPriceHistory_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
CK_ProductListPriceHistory_EndDate  CHECK  N/A  Value: (([EndDate] >= [StartDate]) OR ([EndDate] IS NULL) )
Check constraint [EndDate] >= [StartDate] OR [EndDate] IS NULL 
CK_ProductListPriceHistory_ListPrice  CHECK  N/A  Value: ([ListPrice] > 0.00)
Check constraint [ListPrice]>(0.00) 
PK_ProductListPriceHistory_ProductID_StartDate  PRIMARY KEY  ProductID
StartDate 
Clustered index created by a primary key constraint. 
FK_ProductListPriceHistory_Product_ProductID  FOREIGN KEY  ProductID  Reference table: Production.Product
Foreign key constraint referencing Product.ProductID. 

Triggers 

Name  Description 
Production.uProductListPriceHistory  AFTER UPDATE trigger setting the ModifiedDate column in the ProductListPriceHistory table to the current date. 

Accessed by 

Name  Description 
dbo.ufnGetProductDealerPrice  Scalar function returning the dealer price for a given product on a particular order date. 
dbo.ufnGetProductListPrice  Scalar function returning the list price for a given product on a particular order date. 

Modified by 

Name  Description 
Production.uProductListPriceHistory  AFTER UPDATE trigger setting the ModifiedDate column in the ProductListPriceHistory table to the current date. 

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.