SQL server stored procedure return a table

后端 未结 9 2228
情书的邮戳
情书的邮戳 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:13

    Here's an example of a SP that both returns a table and a return value. I don't know if you need the return the "Return Value" and I have no idea about MATLAB and what it requires.

    CREATE PROCEDURE test
    AS 
    BEGIN
    
        SELECT * FROM sys.databases
    
        RETURN 27
    END
    
    --Use this to test
    DECLARE @returnval int
    
    EXEC @returnval = test 
    
    SELECT @returnval
    

提交回复
热议问题