alter proc proCheckPass
@uid char(10),
@pwd char(10),
@count char(10) output
as
set @count = dbo.fnCheckPass(@uid, @pwd)
declare @count int
exec proCheckPass '001', '666666', @count output
print @count
*** count(*) from T_User where [user_id] = '001' and [user_pwd] = '666666'
CREATE FUNCTION fnCheckPass (@uid char(10), @pwd char(10))
RETURNS int
AS
begin
RETURN (*** count(*) from T_User where [user_id] = @uid and [user_pwd] = @pwd)
end