title: How to return value from stored procedure without output parameters
body: <p>Here's psuedo-code for the stored procedure I currently use,</p>
  
  <pre><code>CREATE PROC uspFoo
  (
  @id int,
  @type nvarchar(255),
  @status bit output
  )
  AS
  IF ....
  SET @status=1
  ELSE
  SET @status=0
  GO
  </code></pre>
  
  <p>When executing this stored procedure, I am forced to pass an output parameter that will store its return value,</p>
  
  <pre><code>DECLARE @id int, @type nvarchar(255), @status bit
  SET @id=..
  SET @type=..
  EXEC uspFoo @id, @assayType, @status output
  
  PRINT @status
  
  GO
  </code></pre>
  
  <p>The return value, or in this case <code>status</code>, will either be 0 (false) or 1 (true). </p>
  
  <p>How can I return a value (e.g. <code>bit</code>) directly without having to store it in a temporary output parameter?</p>