Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create table command with data

Status
Not open for further replies.

DanAuber

IS-IT--Management
Apr 28, 2000
255
FR
In Oracle you can run an SQL command:

Create table table_name as (select column_1 from source_table);

Thus both creating a table and putting data into it in one hit.

Is this possible in SQLSERVER ? - what would the syntax be ??

thanks for any help

Dan Auber
 
Hi,

The syntax you're looking for is SELECT INTO:

SELECT * INTO NewTable FROM OldTable

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top