create proc aaa @cOrderNo char(20) as begin declare @b int select @b=sum(mToyCost) from OrderDetail where cOrderNo=@cOrderNo group by cOrderNo if @b >=60 select @b +'mToyCost>=60' else select @b + 'mToyCost<60' end上面的代码是从网上粘的,可能不对但是这么个意思。如果@b是输出值 那么:return (int)cmd.Parameters["@b"].Value; 就是存储过程中取得的值
as
begin
declare @b int
select @b=sum(mToyCost) from OrderDetail where cOrderNo=@cOrderNo group by cOrderNo
if @b >=60
select @b +'mToyCost>=60'
else
select @b + 'mToyCost<60'
end上面的代码是从网上粘的,可能不对但是这么个意思。如果@b是输出值
那么:return (int)cmd.Parameters["@b"].Value; 就是存储过程中取得的值