title: How to control returning value / table of a stored procedure
body: <pre><code>ALTER PROC SP_SampleInner
  AS
  SELECT COUNT(*) FROM TB_Whatever
  </code></pre>
  
  <p>Other procedure</p>
  
  <pre><code>ALTER RPROC SP_SampleOuter
  AS
  DECLARE @count int
  EXEC @count = SP_SampleInner
  
  IF @count &gt; 0
  BEGIN
  SELECT 1
  END
  ELSE
  BEGIN
  SELECT 0
  END
  </code></pre>
  
  <p>What I want is SP_SampleOuter returns more than one table because of EXEC SP_SampleInner (I think). How could I control returning tables/values?</p>