Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 PROMOTIONALCODE nvarchar(50)   Default = '' The Promotion Code for the discount.
 VALIDFROM datetime Valid from date for the promotion code.
 VALIDTO datetime Valid to date for the promotion code.
 SEQUENCE int   Default = 0 The sequence in which promotion codes are entered.
 DATEADDED datetime   Default = getdate() Indicates the date this record was added.
 DATECHANGED datetime   Default = getdate() Indicates the date this record was last changed.
 TS timestamp   Timestamp.
 TSLONG bigint (Computed) CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Key Field Type Null Notes Description
 DISCOUNTID uniqueidentifier   DISCOUNT.ID The ID of the Discount the Promotion Code belongs to.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_PROMOTIONALCODE_DATEADDED DATEADDED    
 IX_PROMOTIONALCODE_DATECHANGED DATECHANGED      
 PK_PROMOTIONALCODE ID  
 UC_PROMOTIONALCODE_PROMOTIONALCODE PROMOTIONALCODE    

Trigger Name Description
 TR_PROMOTIONALCODE_AUDIT_UPDATE
 TR_PROMOTIONALCODE_AUDIT_DELETE

Entity-Relationship diagram of this table