I've used Microsoft SQL Server Management Studio and one feature allowed me to run an SQL script and copy the output table to my clipboard. Something like this:
When I right click on my output table in MySQL Workbench, I can only copy the row content.
Does anyone know how to copy the whole table including headers?
The statements entered can be saved to a file or snippet for later use. At any point, you can also execute the statements you have entered. To save a snippet of code entered into the query editor, click Save SQL to Snippets List ( ) from the SQL query toolbar, enter a name (optional), and click OK.
To copy from one column to another, you can use INSERT INTO SELECT statement.
Follow these steps in the workbench to get the data and the header rows into Excel.
Like so:
You may have an old version of MySQL Workbench. I can press Ctrl+A on Win or Cmd+A on Mac to select all records. Then Ctrl/Cmd+C to copy to clipboard (or use the "Copy Row" entry which should probably just be named "Copy").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With