execute sp with output parameter

  • How can I execute my stored procedure wich have two input and two output parameters.

    Thanks.

  • 
    
    -- Be sure to declare variables output in
    -- the execute line of the batch...
    declare @input1 varchar(10)
    declare @input2 varchar(10)
    declare @output1 varchar(10)
    declare @output2 varchar(10)
    --
    execute myProc @input1, @input2, @output1 output, @output2 output
    --
    -- Here's the proc declaration...
    --
    CREATE PROC myProc
    @input1 varchar(10)
    , @input2 varchar(10)
    , @output1 varchar(10) output
    , @output2 varchar(10) output
    AS
    BEGIN
    -- Procedure...
    END

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply