+ 1

How to duplicate a table in mysql?

1st Sep 2017, 12:13 PM
Manan Verma
Manan Verma - avatar
3 ответов
+ 4
This might help you CREATE TABLE tbl_new AS SELECT * FROM tbl_old;
1st Sep 2017, 12:57 PM
Harsh
Harsh - avatar
+ 2
select * into new_table from old_table
4th Sep 2017, 1:03 PM
Shehab Magdy
Shehab Magdy - avatar
+ 1
To copy with structure and data table, use this query: CREATE TABLE new_table LIKE old_table; INSERT new_table SELECT * FROM old_table;
1st Sep 2017, 10:46 PM
Yuriy Stolyarov
Yuriy Stolyarov - avatar