Home > Code > SQL Server > Create new table from existing table in SQL server

Create new table from existing table in SQL server

by Spidy   on Feb 21, 2011   Category: SQL Server   |  Views: 940    |  Points: 25   |  Silver 


The given sql query is used to create new table(structure only) from existing table in Sqlserver.
select * into Newtable_Name from ExistingTable_Name where 1=0;

Below query will create the structure and all records from existing table to new table
select * into Newtable_Name from ExistingTable_Name



Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts