Weblog of Nazly Ahmed
Copying records from one table to another can be a very basic requirement. But writing queries to perform this task can be bit of a work around. But there is a very simple query to get this done.
Its by using INSERT … SELECT
Copy one record from a table to another
INSERT INTO `dest_table` SELECT * FROM source_table WHERE id = '10'
It can be very simple as this. Even multiple records can be copied from a single table or several tables. If I'm not mistaken INSERT … SELECT works on MySQL versions 4.1 and above.