Copy table structure: Difference between revisions
From D3xt3r01.tk
Jump to navigationJump to search
(New page: ==CODE== To copy the structure <source lang="mysql"> CREATE TABLE `newtable` LIKE `oldtable`; </source> To also copy the rows in the newtable.. <source lang="mysql"> INSERT `newtable` SEL...) |
(No difference)
|
Latest revision as of 22:46, 25 June 2009
CODE
To copy the structure
CREATE TABLE `newtable` LIKE `oldtable`;
To also copy the rows in the newtable..
INSERT `newtable` SELECT * FROM `oldtable`;