我是新的存儲過程。存儲過程聲明錯誤
我在一個變量中取值列並用If塊檢查它。
我給這家代碼如下:
create proc billRet
as
BEGIN
DECLARE @amt float
set @amt=select amount from bill where Id='2425'
If (@amt>1100.50)
Begin
select @amt
print 'Amount greater '[email protected];
END
Else
Begin
select @amt
print 'Amount Smaller'[email protected]
END
END
Go
它顯示我的打印語句和@amt變量聲明錯誤。
請告訴我我在哪裏犯錯。
請幫幫我。
請包括您獲得的完整錯誤消息。 –