存储过程报错了,怎么改?
CREATE PROCEDURE dt_1_checkpassword@username char(25)
@passwd char(25)
AS
declare @shopper int
if exists (select idShopper from shopper where chrUserName=@username )
begin
if exists ( select idShopper from shopper where chrUserName=@username and chrPassword=@passwd )
select idShopper , chrUserName, UserName=case when len(chrShopperName)<5 then
chrUserName
else
chrShopperName
end
from shopper where chrUserName=@username and chrPassword=@passwd
else
select idShopper= -1
end
else
select idShopper= -2
报@passwd附近有语法错误及必须声明变量"@username"错误
请问要怎么改呀