title: How can create table from result query?
body: <p>I want to create a new table from query result in SSMS:</p>
  <p>Query result:</p>
  <pre><code>select table1.col1, table1.col2, table2.col3
  from table1
  inner join table2 on table1.col1 = table2.col1
  order by col1 asc;
  </code></pre>
  <p>How can I create new table from above result:</p>
  <p>I have tried</p>
  <pre><code>select *
  into new_table
  from (
      select table1.col1, table1.col2, table2.col3
      from table1
      inner join table2 on table1.col1 = table2.col1
      order by col1 asc
  );
  </code></pre>
  <p>I got the error</p>
  <blockquote>
  <p>Msg 102, Level 15, State 1, Line 11 Incorrect syntax near ';'.</p>
  </blockquote>
  <p>Thanks</p>