Duplicate table

I need to create a duplicate of a table I already have.
How do I do that? Do I need to create first a new table or can that be done automatically?
johnkainnAsked:
Who is Participating?
 
JestersGrindConnect With a Mentor Commented:
In Object Explorer, right-click on the table and select Script Table as --> CREATE To --> New Query Editor window.  Then edit the script to change the table names.  Run the script.

Greg
0
 
zvytasConnect With a Mentor Commented:
You can achieve the desired result by issuing the following SQL statement:

SELECT *
INTO NewTable1
FROM Table1
0
 
Christopher GordonConnect With a Mentor Senior Developer AnalystCommented:
I usually use the Import / Export wizard (right click on database in Management Studio).  This will create the destination table and populate with data.  It will not move indexes/constraints.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.