存储过程
请问如何执行下面的存储过程啊,能给出实例吗?谢谢
CREATE PROCEDURE checkuserpassword @sUsername as nvarchar(200),@sPassword as nvarchar(500),@iRet as int output AS
declare @ret as int
declare @spwd as nvarchar(500)
set @spwd=''
declare cur1 cursor for
select pwd from s_users where uname=@susername
open cur1
fetch next from cur1 into @spwd
if @@fetch_status=0
begin
if @spassword=@spwd
begin
set @ret=0
end
else
begin
set @ret=1
end
end
else
begin
set @ret=2
end
close cur1
deallocate cur1
set @iret=@ret
GO