This stored procedure accepts a CategoryID and returns all the products in the Products table in that category. This list is used to populate the _menu user control, and is the engine behind the product list page.
Definition:CREATE Procedure ProductsByCategory ( @CategoryID int ) AS SELECT ProductID, ModelName, UnitCost, ProductImage FROM Products WHERE CategoryID = @CategoryID ORDER BY ModelName, ModelNumberDatabase Tables Used:
Products: The Products table contains all of the information about all of the products on the IBuySpy web site. Its primary key is the ProductID identity field. Note that product descriptions are limited to 3800 characters.