Copy table structure

From D3xt3r01.tk
Revision as of 21:46, 25 June 2009 by Admin (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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`;