~ overflow ~

Copy a Table into another

by z3n on May.12, 2010, under Tips & Hints

Problem:

How to copy a table into another, like a fast backup of a single table.

Solution:

MySQL:

create table <destination> select * from <source>

MSSQL:

select * into <destination> From <source>

Notes:

Although primary keys are preserved, the primary key column will not be automatically set on the destination table, so watch out before start inserting content on the destination.

:, , , ,


No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!