Link to home
Start Free TrialLog in
Avatar of fox_dogg
fox_dogg

asked on

Create table as on SQL Server

What's the syntax to do the following.

I do it on Oracle all the time!

create table temp as select * from other_table

This creates a new table temp with the same strucure and copies all the data into it.
Or I can do

create table temp as col1,col2,ect from other_table

Thanks...
ASKER CERTIFIED SOLUTION
Avatar of Stefaan
Stefaan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scarlett
scarlett

Put a # in front of the new table name to make it a temporary table, i.e., #temp_table
Avatar of fox_dogg

ASKER

Thanks perfect!