谁看看这个 存储过程 where附近有错误
CREATE PROCEDURE [displayshoppingcart]
(
@cartid nvarchar
)
AS
select
goods.goodsid,
goods.modelname,
goods.modelnumber,
shoppingcarts.goodsquentity,
goods.saleprice
FROM
goods,
shoppingcarts,
WHERE
goods.goodsid=shoppingcarts.goodsid
AND
shoppingcarts.shoppingcartid=@cartid
order by
goods.modelname
goods.modelnumber
GO
------解决方案--------------------CREATE PROCEDURE [displayshoppingcart]
(
@cartid nvarchar
)
AS
select
goods.goodsid,
goods.modelname,
goods.modelnumber,
shoppingcarts.goodsquentity,
goods.saleprice
FROM
goods,
shoppingcarts
WHERE
goods.goodsid=shoppingcarts.goodsid
AND
shoppingcarts.shoppingcartid=@cartid
order by
goods.modelname,
goods.modelnumber
GO
这样就OK了
------解决方案--------------------太不小心了就是太粗心了也就是太心胸广阔了^o^
------解决方案--------------------where前面多一个逗号