CREATE PROCEDURE dbo.StoredProcedure35
@Deal_ID int
AS
select
d.Deal_Price,
i.Item_Name
from
Deals d,
Items i,
DealItemRelation r
where
d.Deal_ID = r.Deal_ID
&
i.Item_ID = r.Item_ID
&
d.Deal_ID = @d.Deal_ID
答案 0 :(得分:0)
将&
替换为AND
CREATE PROCEDURE dbo.StoredProcedure35 @Deal_ID int
AS SELECT d.Deal_Price,i.Item_Name FROM Deals d,Items i,DealItemRelation r
WHERE d.Deal_ID=r.Deal_ID AND i.Item_ID=r.Item_ID AND d.Deal_ID=@Deal_ID