Databases > AdventureWorks2019 > Tables > Sales.ShoppingCartItem

AdventureWorks2019

Sales.ShoppingCartItem

//
Contains online customer orders until the order is submitted or cancelled.

Created: Modified:

Columns

  • //
    ${escapify(column.description)}
    ShoppingCartItemID
    [int] IDENTITY (1,1) NOT NULL
  • //
    ${escapify(column.description)}
    ShoppingCartID
    [nvarchar](50) NOT NULL
  • //
    ${escapify(column.description)}
    Quantity
    [int] NOT NULL DEFAULT ((1))
    //
    CONSTRAINT: Check constraint [Quantity] >= (1)
    ([Quantity]>=(1))
  • //
    ${escapify(column.description)}
    ProductID
    [int] NOT NULL
  • //
    ${escapify(column.description)}
    DateCreated
    [datetime] NOT NULL DEFAULT (getdate())
  • //
    ${escapify(column.description)}
    ModifiedDate
    [datetime] NOT NULL DEFAULT (getdate())

Indexes

  • //
    Clustered index created by a primary key constraint.
    PK_ShoppingCartItem_ShoppingCartItemID
    UNIQUE CLUSTERED
    ShoppingCartItemID
  • //
    Nonclustered index.
    IX_ShoppingCartItem_ShoppingCartID_ProductID
    NONCLUSTERED
    ShoppingCartID , ProductID

Foreign Keys

  • //
    Foreign key constraint referencing Product.ProductID.
    FK_ShoppingCartItem_Product_ProductID
    Production.Product
    ProductID ⥱ ProductID

Sample Data

ShoppingCartItemID
ShoppingCartID
Quantity
ProductID
DateCreated
ModifiedDate
2
14951
3
862
4
20621
4
881
5
20621
7
874