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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to SQL Server Copy Tables

Status
Not open for further replies.

mts176

MIS
Apr 17, 2001
109
US
How do you copy a table, as another name.

ex: tblpeople to tblpeopleX

I do not want to lose the original table
 
You can execute following command.

select * into <new Table> from <old Table>

if you do not want to copy the data add any universal false condition.

Thanks.
Praveen
 
Does the new table have to be already created? If so I don't want to have to do that. I want an exact duplicate of the original without having to create a table before hand
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top