Properties

Owner: Sales 
Creation Date: 04/26/2006 
Located On: PRIMARY 
Data Size KB: 24 
Index Size KB: 64 
Rows: 538 
Description: Cross-reference table mapping products to special offer discounts. 

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description
    SpecialOfferID  int          Primary key for SpecialOfferProduct records. 
    ProductID  int          Product identification number. Foreign key to Product.ProductID. 
    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: 4 column(s)

Indexes

Index Primary Unique Description
  PK_SpecialOfferProduct_SpecialOfferID_ProductID      Primary key (clustered) constraint 
  IX_SpecialOfferProduct_ProductID      Nonclustered index. 
  AK_SpecialOfferProduct_rowguid      Unique nonclustered index. Used to support replication samples. 
Total: 3 index(es)

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint
  Sales.SalesOrderDetail  FK_SalesOrderDetail_SpecialOfferProduct_SpecialOfferIDProductID  PK_SpecialOfferProduct_SpecialOfferID_ProductID 
Total: 1 table(s)

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint
  Production.Product  FK_SpecialOfferProduct_Product_ProductID  PK_Product_ProductID 
  Sales.SpecialOffer  FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID  PK_SpecialOffer_SpecialOfferID 
Total: 2 table(s)

Objects that [Sales].[SpecialOfferProduct] depends on

Object Name Owner Object Type Dep Level
  Flag  dbo  User Defined type 
  Name  dbo  User Defined type 
  ProductCategory  Production  Table 
  ProductModel  Production  Table 
  SpecialOffer  Sales  Table 
  UnitMeasure  Production  Table 
  ProductSubcategory  Production  Table 
  Product  Production  Table 
Total: 8 object(s)

Objects that depend on [Sales].[SpecialOfferProduct]

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

SQL

CREATE TABLE [SpecialOfferProduct] (
    [SpecialOfferID] [int] NOT NULL ,
    [ProductID] [int] NOT NULL ,
    [rowguid]  uniqueidentifier ROWGUIDCOL  NOT NULL CONSTRAINT [DF_SpecialOfferProduct_rowguid] DEFAULT (newid()),
    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_SpecialOfferProduct_ModifiedDate] DEFAULT (getdate()),
    CONSTRAINT [PK_SpecialOfferProduct_SpecialOfferID_ProductID] PRIMARY KEY  CLUSTERED
    (
        [SpecialOfferID],
        [ProductID]
    )  ON [PRIMARY] ,
    CONSTRAINT [FK_SpecialOfferProduct_Product_ProductID] FOREIGN KEY
    (
        [ProductID]
    ) REFERENCES [Product] (
        [ProductID]
    ),
    CONSTRAINT [FK_SpecialOfferProduct_SpecialOffer_SpecialOfferID] FOREIGN KEY
    (
        [SpecialOfferID]
    ) REFERENCES [SpecialOffer] (
        [SpecialOfferID]
    )
) ON [PRIMARY]
GO


See Also

List of tables