Search This Blog

Thursday, November 15, 2018

How to duplicate a MySQL table, indexes and data

CREATE TABLE newtable LIKE oldtable;
INSERT newtable SELECT * FROM oldtable;

See also:

How to move MySQL table to another location