Saturday, September 25, 2010

Create a db table from another db table

Often we come across the scenario to backup some db tables as security precaution.
Solution:

Use below query to accomplish the same:
SELECT * INTO TableB FROM TableB
go
The only disadvantage with this approach is primary key will not be restored in backup table.
For more information please click here.

No comments:

Post a Comment