Answers for "mysql copy a table"

SQL
4

mysql copy table with new name

CREATE TABLE IF NOT EXISTS new_table LIKE existing_table;

INSERT new_table
SELECT * FROM existing_table;
Posted by: Guest on September-09-2020
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