title: Return Output Param of a Stored Procedure inside another Stored Procedure
body: <p>I'm trying to find out how to return the output parameter of a stored procedure when executing the stored procedure inside another stored procedure:</p>
  
  <pre><code> CREATE PROCEDURE Test1
  
   EXEC SpWithOutputID -- Outputs @ID
  
   SELECT @ID as ID -- Output @ID now being used in this SP
  </code></pre>
  
  <p>This is of course not my code, but just an example, is it possible to do this?</p>
  
  <p>Example 2:
       --Here @ID returns Null</p>
  
  <pre><code> CREATE PROCEDURE Test1
   As 
   DECLARE @ID int
  
   EXEC SpWithOutputID @ID = @ID OUTPUT -- Outputs @ID
  
   SELECT @ID as ID -- Output @ID now being used in this SP
  </code></pre>
  
  <p>Example 3:
       --Here @ID returns an Int</p>
  
  <pre><code> CREATE PROCEDURE Test1
   As 
  
   EXEC SpWithOutputID -- Outputs @ID
  </code></pre>