Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB:
Index Size KB: 24 
Rows: 16 
Description: Sale discounts lookup table. 


Name Data Type Length NULL Default IsIdentity IsGUID Description
    SpecialOfferID  int          Primary key for SpecialOffer records. 
    Description  nvarchar  255          Discount description. 
    DiscountPct  smallmoney    ((0.00))      Discount precentage. 
    Type  nvarchar  50          Discount type category. 
    Category  nvarchar  50          Group the discount applies to such as Reseller or Customer. 
    StartDate  datetime          Discount start date. 
    EndDate  datetime          Discount end date. 
    MinQty  int    ((0))      Minimum discount percent allowed. 
    MaxQty  int          Maximum discount percent allowed. 
    rowguid  uniqueidentifier  16    (newid())      ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. 
    ModifiedDate  datetime    (getdate())      Date and time the record was last updated. 
Total: 11 column(s)

Identity column

Name Seed Increment Not for replication


Index Primary Unique Description
  PK_SpecialOffer_SpecialOfferID      Primary key (clustered) constraint 
  AK_SpecialOffer_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 2 index(es)

Check Constraints

Name Expression
  CK_SpecialOffer_DiscountPct  ([DiscountPct]>=(0.00)) 
  CK_SpecialOffer_EndDate  ([EndDate]>=[StartDate]) 
  CK_SpecialOffer_MaxQty  ([MaxQty]>=(0)) 
  CK_SpecialOffer_MinQty  ([MinQty]>=(0)) 
Total: 4 constraint(s)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.SpecialOfferProduct  FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID  PK_SpecialOffer_SpecialOfferID 
Total: 1 table(s)

Objects that depend on [Sales].[SpecialOffer]

Object Name Owner Object Type Dep Level
  SpecialOfferProduct  Sales  Table 
  SalesOrderDetail  Sales  Table 
  iduSalesOrderDetail  Sales  Trigger 
Total: 3 object(s)


CREATE TABLE [SpecialOffer] (
    [SpecialOfferID] [int] IDENTITY (1, 1) NOT NULL ,
    [Description] [nvarchar] (255) COLLATE Latin1_General_CS_AS NOT NULL ,
    [DiscountPct] [smallmoney] NOT NULL CONSTRAINT [DF_SpecialOffer_DiscountPct] DEFAULT ((0.00)),
    [Type] [nvarchar] (50) COLLATE Latin1_General_CS_AS NOT NULL ,
    [Category] [nvarchar] (50) COLLATE Latin1_General_CS_AS NOT NULL ,
    [StartDate] [datetime] NOT NULL ,
    [EndDate] [datetime] NOT NULL ,
    [MinQty] [int] NOT NULL CONSTRAINT [DF_SpecialOffer_MinQty] DEFAULT ((0)),
    [MaxQty] [int] NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_SpecialOffer_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_SpecialOffer_ModifiedDate] DEFAULT (getdate()),
    )  ON [PRIMARY] ,
    CONSTRAINT [CK_SpecialOffer_DiscountPct] CHECK ([DiscountPct]>=(0.00)),
    CONSTRAINT [CK_SpecialOffer_EndDate] CHECK ([EndDate]>=[StartDate]),
    CONSTRAINT [CK_SpecialOffer_MaxQty] CHECK ([MaxQty]>=(0)),
    CONSTRAINT [CK_SpecialOffer_MinQty] CHECK ([MinQty]>=(0))

See Also

List of tables