Production.ProductListPriceHistory Table

Information

NameProductListPriceHistory
SchemaProduction
Row Count0
Data Size 
Index Size 
Reserved Size 
Unused Size 
Created29.3.2010. 21:58:18
Modified29.3.2010. 21:58:54

Extended Properties

NameTypeProperty NameValue
ProductListPriceHistoryTABLEMS_DescriptionChanges in the list price of a product over time.

Columns

PKKeyIdentityNameData TypeAllow NullsCollationReferencesDefaultComputedCompute Expression
   ProductIDint  Production.Product.ProductID
 
 
 
   StartDatedatetime   
 
 
 
   EndDatedatetime   
 
 
 
   ListPricemoney   
 
 
 
   ModifiedDatedatetime   
(getdate())
 
 

Indexes

NameTypePrimaryUniqueColumns
PK_ProductListPriceHistory_ProductID_StartDateClustered  ProductID, StartDate

Check Constraints

NameColumnEnabledTrustedExpression
CK_ProductListPriceHistory_EndDate   ([EndDate]>=[StartDate] OR [EndDate] IS NULL)
CK_ProductListPriceHistory_ListPriceListPrice  ([ListPrice]>(0.00))

Foreign Key Constraints

NameTypeReferenced Table
FK_ProductListPriceHistory_Product_ProductIDForeign keyProduction.Product

SQL Script

CREATE TABLE [Production].[ProductListPriceHistory] (
    [ProductID] int NOT NULL,
    [StartDate] datetime NOT NULL,
    [EndDate] datetime NULL,
    [ListPrice] money NOT NULL,
    [ModifiedDate] datetime NOT NULL DEFAULT (getdate())
);