mysql> CREATE TABLE table_2 LIKE table_1;
mysql> INSERT INTO table_2 SELECT * FROM table_1;
mysql> INSERT INTO table1 ( column1 ) SELECT col1 FROM table2
Reference :
How to clone a table in MySQL - O'Reilly Answers
database - SQL Insert into ... values ( SELECT ... FROM ... ) - Stack Overflow
沒有留言:
張貼留言