Bug #67810 Implement QueryBrowser feature to right-click column headers to copy columns
Submitted: 5 Dec 2012 6:31 Modified: 24 Mar 2013 4:29
Reporter: michael plavins Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench: SQL Editor Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[5 Dec 2012 6:31] michael plavins
The old Query Browser had a very useful feature that in the results table, if you right-clicked the column header you could select to copy the column names - now it only has options for filters.

This is very handy in creating a new query with named columns - e.g. the clipboard would contain "column1, column2, ...." so you could very easily create a query in the editor or in external code, e.g.
  select column1, column2, .... from table (etc)
  insert into table (column1, column2, ....) values (etc)

Currently you can get them with show columns or show create table, but you have to edit out everything around the names.

How to repeat:
Run the old deprecated Query Browser and right click on the HEADERS of a results table to see how it used to work
[22 Mar 2013 16:37] Armando Lopez Valencia
In the object browser, if you expand the desired table and you right click on the "Columns" object you can get the something very close to what you require IE:
SELECT actor_id, first_name, last_name, last_update
FROM `sakila`.`actor`;
Please give it a try and let us know if that helps.
[24 Mar 2013 4:29] michael plavins
That works fine -- thanks a lot for pointing it out!

Also just selecting Name 'short' or 'long' will also work - the difference seems to be that 'long' adds backticks.

Cheers (closing ticket)