Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I create duplicate table?

Author  Topic 

grandhi
Starting Member

31 Posts

Posted - 2013-04-20 : 02:30:08
Hi All,

I have a table,name as Employee-Details.

for my safety purpose,I want to create duplicate table with entire data.

I want to assign duplicate table name is DummyEmployee-Details

how can I do this?

can anyone help me?

Thank you.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-20 : 02:32:29
[code]
SELECT * INTO [DummyEmployee-Details] FROM [Employee-Details]
[/code]
will create new table for you with the data.

Then you can script our any other constraints indexes etc to new table from old table

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -