Answers for "copy all the tables mysql"

SQL
1

how to duplicate table in mysql

CREATE table `duplicat` LIKE `orginal`;
INSERT `duplicat` SELECT * FROM `orginal`;
Posted by: Guest on June-02-2021
0

clone table structure mysql

CREATE TABLE foo SELECT * FROM bar LIMIT 0

Or
CREATE TABLE foo SELECT * FROM bar WHERE 1=0
Posted by: Guest on December-22-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language