How to copy a table from one database to another database including structure and data in mysql

By | April 12, 2017

There are different options for copying table from one database to another database. Two methods i m giving here

1.In phpmyadmin one option is there to copy tables.Phpmyadmin if you go to operations tab->copy database to
using the below options using a checkbox.

Structure only
Structure and data
Data only
CREATE DATABASE before copying
Add DROP TABLE / DROP VIEW
Add AUTO_INCREMENT value
Add constraints
Switch to copied database

2. through a query you can copy the tables.in this case permission is required in the phpmyadmin
suppose to database test1,test2 and test2 having one table tbl_employee.we need to copy the table tbl_employee to test1.
create table test1.tbl_employee select * from test2.tbl_employee