Return value in SQL Server stored procedure

前端 未结 4 936
忘掉有多难
忘掉有多难 2021-02-05 12:36

I have a stored procedure that has an if statement in it. If the number of rows counted is greater than 0 then it should set the only output parameter @UserId to 0<

4条回答
  •  我寻月下人不归
    2021-02-05 12:58

    Try to call your proc in this way:

    DECLARE @UserIDout int
    
    EXEC YOURPROC @EmailAddress = 'sdfds', @NickName = 'sdfdsfs', ..., @UserId = @UserIDout OUTPUT
    
    SELECT @UserIDout 
    

提交回复
热议问题