Tip: Create a new table with data from an existing table

To create a new table from an existing table (using both structure and data), use the following query

create table table_new select * from table_old;

If you want to create a new table from selected columns of an existing table, use the this query create table table_new select col1,col2,col3,col4 from table_old

 

More MySQL tips