Question
How can I quickly recreate a table and its data using just copy/paste across different terminals?Answer
This is NOT a recommended practice to migrate data from one database to another and it should NOT be used for production data migration. This is simply intended as a quick and dirty way to recreate small amount of data when developing across multiple environments.- Get the CREATE TABLE statement with
SHOW CREATE table:
- Get the data export using
FORMAT SQLInsert
table at point 2 with the actual table name (cookies in this example)