To copy all content of one table to another table use following query.
consider you have two tables table_source & table_destination.
To copy content of table_source to table_destination.
INSERT INTO table_destination SELECT * FROM table_source;
see the bellow example
mysql> create table zdevendra(id integer(10) auto_increment primary key, name varchar(50), salery int(10));
Query OK, 0 rows affected (0.01 sec)
mysql> desc zdevendra;
+--------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+----------------+
| id | int(10) | NO | PRI | NULL | auto_increment |
| name | varchar(50) | YES | | NULL | |
| salery | int(10) | YES | | NULL | |
+--------+-------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
mysql> insert into zdevendra (name, salery) values('first name','1000');
Query OK, 1 row affected (0.00 sec)
mysql> insert into zdevendra (name, salery) values('second name','2000');
Query OK, 1 row affected (0.00 sec)
mysql> insert into zdevendra (name, salery) values('third name','3000');
Query OK, 1 row affected (0.00 sec)
mysql> insert into zdevendra (name, salery) values('forth name','4000');
Query OK, 1 row affected (0.00 sec)
mysql> insert into zdevendra (name, salery) values('fifth name','5000');
Query OK, 1 row affected (0.00 sec)
mysql> select * from zdevendra;
+----+-------------+--------+
| id | name | salery |
+----+-------------+--------+
| 1 | first name | 1000 |
| 2 | second name | 2000 |
| 3 | third name | 3000 |
| 4 | forth name | 4000 |
| 5 | fifth name | 5000 |
+----+-------------+--------+
5 rows in set (0.00 sec)
mysql> create table zzdevendra(id integer(10) auto_increment primary key, name varchar(50), salery int(10));
Query OK, 0 rows affected (0.01 sec)
mysql> select * from zzdevendra;
Empty set (0.00 sec)
mysql> insert into zzdevendra select * from zdevendra;
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0
mysql> select * from zzdevendra;
+----+-------------+--------+
| id | name | salery |
+----+-------------+--------+
| 1 | first name | 1000 |
| 2 | second name | 2000 |
| 3 | third name | 3000 |
| 4 | forth name | 4000 |
| 5 | fifth name | 5000 |
+----+-------------+--------+
5 rows in set (0.00 sec)
mysql>
You are done!
:Devendra