title: T-SQL Stored Procedure returned value into variable
body: <p>I have a simple stored procedure on MS SQL 2012 Express that returns a result doing something like :</p>
  
  <pre><code>DECLARE @value INT;
  SELECT @value;
  </code></pre>
  
  <p>Meanwhile I am trying to call this stored procedure doing something like</p>
  
  <pre><code>DECLARE @result INT;
  EXEC @result = SpFoo .....
  </code></pre>
  
  <p>However the value I get on <code>@result</code> from the <code>SpFoo</code>is 0.</p>
  
  <p>How can I get the real value returned from the Stored Procedure?</p>
  
  <p>Thanks</p>