How to copy tables in MySQL

My first instinct was to make an export/import, but there is smarter ways to make it:

First you have to create the table with the same schema:

CREATE TABLE database2.newtable LIKE database1.table;

Then you can copy data from table to newtable:

INSERT INTO database2.newtable SELECT * FROM database1.table;

If you need, you can add WHERE clause to the select, also, if you are working in the same db you don’t need to specific the database name.