存储过程调用
----创建存储过程
create procedure login(@user varchar(50),@pwd varchar(50) ,@blnReturn int output)
as
Declare @_user varchar(50),@_pwd varchar(50)
begin
select @_pwd=[pwd] from tb_Admin where [user]=@_user
if @_pwd=@pwd
begin
set @blnReturn= 1
end
else
set @blnReturn=0
end
----查询分析器中调试存储过程
declare @return int
exec login 'hnlyw', '7FEF6171469E80D32C0559F88B377245', @return output
print @return
create procedure login(@user varchar(50),@pwd varchar(50) ,@blnReturn int output)
as
Declare @_user varchar(50),@_pwd varchar(50)
begin
select @_pwd=[pwd] from tb_Admin where [user]=@_user
if @_pwd=@pwd
begin
set @blnReturn= 1
end
else
set @blnReturn=0
end
----查询分析器中调试存储过程
declare @return int
exec login 'hnlyw', '7FEF6171469E80D32C0559F88B377245', @return output
print @return
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
一只站在树上的鸟儿,从来不会害怕树枝会断裂,因为它相信的不是树枝,而是它自己的翅膀。与其每天担心未来,不如努力做好现在。