Tables SQL 2005 Adventure Works OLTP

Sales.SalesReason

Object type: Table

Lookup table of customer purchase reasons.

Columns 

Name  Data type  Nullable  Description 
SalesReasonID  int  No Column has identity seed value of 1 with a step value of 1.
Primary key for SalesReason records. 
Name  Name  No Sales reason description. 
ReasonType  Name  No Category the sales reason belongs to. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_SalesReason_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
PK_SalesReason_SalesReasonID  PRIMARY KEY  SalesReasonID  Clustered index created by a primary key constraint. 

Triggers 

Name  Description 
Sales.uSalesReason  AFTER UPDATE trigger setting the ModifiedDate column in the SalesReason table to the current date. 

Linked tables 

Name  Description 
Sales.SalesOrderHeaderSalesReason  Cross-reference table mapping sales orders to sales reason codes. 

Modified by 

Name  Description 
Sales.uSalesReason  AFTER UPDATE trigger setting the ModifiedDate column in the SalesReason 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.