title: Declare a table variable without column definitions?
body: <p>Is there a way, in SQL Server, to declare a table variable without knowing the table definitions?</p>
  
  <p>Exempli gratia:</p>
  
  <pre><code>DECLARE @Results TABLE
  INSERT INTO @Results EXEC MyProc @param1 = @myValue
  </code></pre>
  
  <p>or</p>
  
  <pre><code>DECLARE @Results TABLE
  SELECT INTO @Results EXEC MyProc @param1 = @myValue
  </code></pre>
  
  <p>or</p>
  
  <pre><code>DECLARE @Results TABLE
  EXEC MyProc @param1 = @myValue INTO @Results
  </code></pre>
  
  <p>or </p>
  
  <pre><code>DECLARE @Results TABLE
  EXEC INTO @Results MyProc @param1 = @myValue
  </code></pre>
  
  <p>or</p>
  
  <pre><code>DECLARE @Results TABLE
  SELECT * FROM EXEC MyProc @param1 = @myValue INTO @Results
  </code></pre>
  
  <p>or</p>
  
  <pre><code>DECLARE @Results TABLE
  SELECT * INTO @Results FROM EXEC MyProc @param1 = @myValue
  </code></pre>
  
  <p>or</p>
  
  <pre><code>DECLARE @Results TABLE
  SELECT * INTO @Results EXEC MyProc @param1 = @myValue
  </code></pre>
  
  <p>(you get the idea)</p>