"ShoppingCartRemoveItem" Stored Procedure

Description:

This stored procedure deletes the given ProductID from the given CartID.  It is used on the Shopping Cart screen when an item is removed from the shopping cart.

Definition:

    CREATE Procedure ShoppingCartRemoveItem
    (
        @CartID nvarchar(50),
        @ProductID int
    )
    AS

    DELETE FROM ShoppingCart

    WHERE
        CartID = @CartID
      AND
        ProductID = @ProductID
        
Database Tables Used:

ShoppingCart:   The ShoppingCart table keeps track of the items a user has purchased.  It's primary key is the RecordID field.  The CartID is a string which we use to identify the user currently logged in.  There is a many to one relationship between the ShoppingCart table and the Products table.  Note that if not Quantity is supplied, a default of 1 is entered.