How to copy a table in MySQL

To copy a table in MySQL you can use the following snippet.

Sample MySQL

CREATE TABLE NEWTABLE LIKE OLDTABLE; 
INSERT NEWTABLE SELECT * FROM OLDTABLE;

Please Share us:
Please rate this snippet

3 thoughts on “How to copy a table in MySQL

Leave a Reply