MySQL Workbench: Difference between revisions

From HaFrWiki42
Jump to navigation Jump to search
Created page with "{{TOCright}} 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 T..."
 
 
Line 13: Line 13:
== See also ==
== See also ==
<span class="editsection">[[#content|top]]</span>
<span class="editsection">[[#content|top]]</span>
* [[SQL]], More SQL statements to remember.


== Reference ==
== Reference ==

Latest revision as of 08:38, 20 May 2014

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

top

  • SQL, More SQL statements to remember.

Reference

top