sp_products_sel_byproductid,其代码如下:alter procedure sp_products_sel_byproductid
@chrproductid char(38)
as
select productid, sku, producttype,productdate,productname,
description, productsize, imageurl, unitprice, onsale
from products where productid = @chrproductidsp_categories_sel_bycategoryid代码如下
alter procedure sp_categories_sel_bycategoryid
@chrcategoryid char(38)
as
select categoryid, categoryname, description
from categories  where categoryid = @chrcategoryid
return
procedure sp_customers_login其代码如下
alter procedure sp_customers_login
(@stremailaddress nvarchar(50) ,@strpassword  nvarchar(10),
  @intcustomerid int  output)
as
 select @intcustomerid=customerid
from  customers where
emailaddress= @stremailaddress and password=@strpassword
if @@rowcount < 1 select @intcustomerid=0
procedure sp_customers_ins其代码如下
ALTER procedure sp_customers_ins
(@intcustomerid int output,@nvchrcustomername nvarchar(50),
@nvchremailaddress nvarchar(50),@nvchrpassword nvarchar(10))
as
insert into customers
( customername, emailaddress,password)
values(@nvchrcustomername,@nvchremailaddress,
@nvchrpassword)
select @intcustomerid=@@identity
procedure sp_customers_details代码如下
alter procedure sp_customers_details
(@intcustomerid int,@nvchrcustomername nvarchar(50) output,
@nvchremailaddress nvarchar(50) output,
@nvchrpassword nvarchar(10) output)
as
select @nvchrcustomername=customername,
@nvchremailaddress=emailaddress, @nvchrpassword=password
From customers where customerid=@intcustomerid
 
sp_orders_ins其代码如下
ALTER procedure sp_orders_ins
(@strcustomerid int,@dtshipdate datetime,@intorderid int output)
as
insert intoorders(customerid,shippeddate)
values(@strcustomerid,@dtshipdate)
select @intorderid=@@identity
sp_orderitem_ins其代码如下
alter procedure sp_orderitem_ins
(@intorderid int,@productid nvarchar(38),@quantity int)
as
declare @unitprice money
select @unitprice=products.unitprice
from products where products.productid=@productid
insert into orderitem(orderid,productid,quantity,unitprice)
values(@intorderid,@productid,@quantity,@unitprice)
sp_orders_sel_bycustomerid其代码如下
alter procedure sp_orders_sel_bycustomerid
(@intcustomerid int)
as
select orders.orderid,cast(sum(orderitem.quantity*orderitem.unitprice) as money) as grandtotal,orders.orderdate,orders.shipdate
from orders
inner join orderitem on orders.orderid=orderitem.orderid
group by customerdi, orders.orderid, orders.orderdate,
orders.shipdate
having orders.customerid=@intcustomeridsp_shoppingcart_additem其代码如下
alter procedure sp_shoppingcart_additem
(@strcartid nvarchar(50),@strproductid char(38),@intquantity int)
as 
declare @itemscount int
select @itemscount=count(quantity)
from shoppingcart where productid=@strproductid and cartid=@strcartid
if @itemscount>0
update shoppingcart
set quantity=(@intquantity+shoppingcart.quantity)
where productid=@strproductid and cartid=@strcartid
else insert into shoppingcart(cartid,productid,quantity)
values(@strcartid,@strproductid,@intquantity)
sp_shoppingcart_remitem其代码如下
alter procedure sp_shoppingcart_remitem
(@strcartid nvarchar(50),@strproductid char(38))
as
delete from shoppingcart where productid=@strproductid
and cartid=@strcartid
sp_shoppingcart_itemscount其代码如下
alter procedure sp_shoppingcart_itemscount
(@strcartid nvarchar(50))
as 
select productid from shoppingcart where cartid=@strcartid
sp_shoppingcart_subtotail其代码如下
alter procedure sp_shoppingcart_subtotail
(@strcartid nvarchar(50),@totalcost money output)
as
select @totalcost=sum(products.unitprice*shoppingcart.quantity)
from shoppingcart,products where shoppingcart.cartid=@strcartid
and products.productid=shoppingcart.productid
sp_shoppingcart_upd其代码如下
alter procedure sp_shoppingcart_upd
(@strcartid nvarchar(50),@strproductid char(38),@intquantity int)
as
update shoppingcart
set quantity=@intquantity
where productid=@strproductid  and cartid =@strcartid
sp_shoppingcart_del其代码如下
alter procedure sp_shoppingcart_del
(@strcartid nvarchar(50))
as
delete shoppingcart
where cartid=@strcartid
sp_shoppingcart_migrate其代码如下
alter procedure sp_shoppingcart_migrate
(@strorigioncartid nvarchar(50),@strnewcartid nvarchar(50))
As
Update shoppingcart
set cartid=@strnewcartid  where cartid=@strorigioncartid
sp_shoppingcart_itemdetails其代码如下
ALTER procedure sp_shoppingcart_itemdetails
(@strcartid nvarchar(50))
as
select products.productid, products.sku, products.productname,
products.description, products.unitprice, shoppingcart.quantity,
cast((products.unitprice*shoppingcart.quantity) as money ) as
extendedprice
from products, shoppingcart
where products.productid=shoppingcart.productid
and shoppingcart.cartid=@strcartid顺便邦我解释下意思,谢了!!  不懂这些啊```