Copy table structure

From D3xt3r01.tk
Jump to navigationJump to search

CODE

To copy the structure

CREATE TABLE `newtable` LIKE `oldtable`;

To also copy the rows in the newtable..

INSERT `newtable` SELECT * FROM `oldtable`;