MySQL Workbench
Jump to navigation
Jump to search
There are sql statements you are using a lot, and there are some you need only once or twice. So I make this my SQL remember place for MySQL Workbench.
Copy Table Structure and Data
Copy a sql table structure and and data into a new table.
- Right mouse click the table you want to copy
- Choose, Send to SQL Editor -> Create Statement
- Select all and execute the statement (lightening bolt icon)
- In SQL statement, change table name
- Then execute the statement:
INSERT INTO `table2` SELECT * FROM `table1`
See also
- SQL, More SQL statements to remember.