title: SQL Server Stored Procedure capture return value in T-SQL
body: <p>I have a SQL Server stored procedure; I need to capture the return value from the stored procedure. Is this the correct way of doing this?</p>
  
  <pre class="lang-sql prettyprint-override"><code>  declare valback varchar(30)
    set valback = exec storeproc1 
  </code></pre>
  
  <p>In this case, <code>storeproc1</code> is my stored procedure.</p>