views:

47

answers:

1

Need to duplicate a TABLE using Microsoft SQL Management Studio 2008

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

Thanks.

+2  A: 

I assume that Mysql tag is wrong

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

SELECT * INTO NewTable
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 data...it will NOT do any of the constraints, you need to script those out and change the names in those scripts

SQLMenace
Thank you very much :)
Alex