| AdventureWorks Database > Sales Schema : Sales.SpecialOffer Table |
| Creation Date | 08/01/2010 08:40 |
| File Group | PRIMARY |
| Text File Group | |
| System Object | ![]() |
| Published for Replication | ![]() |
| Rows | 16 |
| Data Space Used | 8.00 KB |
| Index Space Used | 24.00 KB |
| Column Name | Description | Datatype | Length | Allow Nulls | Default | Formula | |
|---|---|---|---|---|---|---|---|
| SpecialOfferID | Primary key for SpecialOffer records. | int | 4 | |||
| Description | Discount description. | nvarchar | 255 | ||||
| DiscountPct | Discount precentage. | smallmoney | 8 | ((0.00)) | |||
| Type | Discount type category. | nvarchar | 50 | ||||
| Category | Group the discount applies to such as Reseller or Customer. | nvarchar | 50 | ||||
| StartDate | Discount start date. | datetime | 4 | ||||
| EndDate | Discount end date. | datetime | 4 | ||||
| MinQty | Minimum discount percent allowed. | int | 4 | ((0)) | |||
| MaxQty | Maximum discount percent allowed. | int | 4 | ![]() | |||
| rowguid | ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. | uniqueidentifier | 16 | (newid()) | |||
| ModifiedDate | Date and time the record was last updated. | datetime | 4 | (getdate()) |
| Index | Description | Primary | Unique |
|---|---|---|---|
| AK_SpecialOffer_rowguid | Unique nonclustered index. Used to support replication samples. | ![]() | |
| PK_SpecialOffer_SpecialOfferID | Primary key (clustered) constraint | ![]() | ![]() |
| Name | Description | Expression |
|---|---|---|
| CK_SpecialOffer_DiscountPct | Check constraint [DiscountPct] >= (0.00) | ([DiscountPct]>=(0.00)) |
| CK_SpecialOffer_EndDate | Check constraint [EndDate] >= [StartDate] | ([EndDate]>=[StartDate]) |
| CK_SpecialOffer_MaxQty | Check constraint [MaxQty] >= (0) | ([MaxQty]>=(0)) |
| CK_SpecialOffer_MinQty | Check constraint [MinQty] >= (0) | ([MinQty]>=(0)) |
| Relationship | Description |
|---|---|
| FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID | Foreign key constraint referencing SpecialOffer.SpecialOfferID. |
| Database Object | Object Type | Description | Dep Level | |
|---|---|---|---|---|
![]() | iduSalesOrderDetail | Trigger | AFTER INSERT, DELETE, UPDATE trigger that inserts a row in the TransactionHistory table, updates ModifiedDate in SalesOrderDetail and updates the SalesOrderHeader.SubTotal column. | 3 |
![]() | Sales.SalesOrderDetail | Table | Individual products associated with a specific sales order. See SalesOrderHeader. | 2 |
![]() | Sales.SpecialOfferProduct | Table | Cross-reference table mapping products to special offer discounts. | 1 |
|