title: How to SELECT FROM stored procedure
body: <p>I have a stored procedure that returns rows:</p>
  <pre><code>CREATE PROCEDURE MyProc
  AS
  BEGIN
      SELECT * FROM MyTable
  END
  </code></pre>
  <p>My actual procedure is a little more complicated, which is why a stored procedure is necessary.</p>
  <p>Is it possible to select the output by calling this procedure?</p>
  <p>Something like:</p>
  <pre><code>SELECT * FROM (EXEC MyProc) AS TEMP
  </code></pre>
  <p>I need to use <code>SELECT TOP X</code>, <code>ROW_NUMBER</code>, and an additional <code>WHERE</code> clause to page my data, and I don't really want to pass these values as parameters.</p>