Alex Alex - 2 years ago 79
SQL Question

Duplicating a TABLE using Microsoft SQL Server Mangement

Need to duplicate a TABLE using

Microsoft SQL Management Studio 2008

The TABLE needs to duplicate all table row (Primary Key) ID as well.


Answer Source

I assume that my sql tag is wrong

in SSMS open a new query window and then do something like

FROM OldTable

change NewTable to the name that the new table should have, change OldTable to the name of the current table

this will copy over the basic table structure and all the will NOT do any of the constraints, you need to script those out and change the names in those scripts

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download