create table as select in sql server code example
Example 1: sqlserver create table from select
Select * into new_table from old_table
Example 2: sql create table with columns as another table
SELECT * INTO newtable FROM oldtable WHERE 1 = 0;
Select * into new_table from old_table
SELECT * INTO newtable FROM oldtable WHERE 1 = 0;