SQL server stored procedure return a table

后端 未结 9 2232
情书的邮戳
情书的邮戳 2020-12-04 19:39

I have a stored procedure that takes in two parameters. I can execute it successfully in Server Management Studio. It shows me the results which are as I expect. However it

9条回答
  •  臣服心动
    2020-12-04 20:27

    You can use an out parameter instead of the return value if you want both a result set and a return value

    CREATE PROCEDURE proc_name 
    @param int out
    AS
    BEGIN
        SET @param = value
    SELECT ... FROM [Table] WHERE Condition
    END
    GO
    

提交回复
热议问题