Tables SQL 2005 Adventure Works OLTP

Sales.SpecialOffer

Object type: Table

Sale discounts lookup table.

Columns 

Name  Data type  Nullable  Description 
SpecialOfferID  int  No Column has identity seed value of 1 with a step value of 1.
Primary key for SpecialOffer records. 
Description  nvarchar(255)  No Discount description. 
DiscountPct  smallmoney  No Default value: 0.00
Discount precentage. 
Type  nvarchar(50)  No Discount type category. 
Category  nvarchar(50)  No Group the discount applies to such as Reseller or Customer. 
StartDate  datetime  No Discount start date. 
EndDate  datetime  No Discount end date. 
MinQty  int  No Default value: 0
Minimum discount percent allowed. 
MaxQty  int  Yes Maximum discount percent allowed. 
rowguid  uniqueidentifier  No Default value: NEWID()
ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
ModifiedDate  datetime  No Default value: GETDATE()
Date and time the record was last updated. 

Constraints 

Name  Type  Columns  Description 
DF_SpecialOffer_DiscountPct  DEFAULT  DiscountPct  Value: 0.00
Default constraint value of 0.0 
DF_SpecialOffer_MinQty  DEFAULT  MinQty  Value: 0
Default constraint value of 0.0 
DF_SpecialOffer_rowguid  DEFAULT  rowguid  Value: NEWID()
Default constraint value of NEWID() 
DF_SpecialOffer_ModifiedDate  DEFAULT  ModifiedDate  Value: GETDATE()
Default constraint value of GETDATE() 
CK_SpecialOffer_EndDate  CHECK  N/A  Value: ([EndDate] >= [StartDate])
Check constraint [EndDate] >= [StartDate] 
CK_SpecialOffer_DiscountPct  CHECK  N/A  Value: ([DiscountPct] >= 0.00)
Check constraint [DiscountPct]>=(0.00) 
CK_SpecialOffer_MinQty  CHECK  N/A  Value: ([MinQty] >= 0)
Check constraint [MinQty]>=(0) 
CK_SpecialOffer_MaxQty  CHECK  N/A  Value: ([MaxQty] >= 0)
Check constraint [MaxQty]>=(0) 
PK_SpecialOffer_SpecialOfferID  PRIMARY KEY  SpecialOfferID  Clustered index created by a primary key constraint. 

Indices 

Name  Description 
AK_SpecialOffer_rowguid  Unique nonclustered index.Used to support replication samples. 

Triggers 

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

Linked tables 

Name  Description 
Sales.SpecialOfferProduct  Cross-reference table mapping products to special offer discounts. 

Modified by 

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