How to Copy Only Column Headers from Query Results in Oracle SQL Developer

thatjeffsmith SQL Developer 3 Comments

Tell Others About This Story:

Short and sweet post today – let’s say you’ve written a SELECT *, and your query results have some column headers you want to copy out. Yes, you could copy out the result set WITH the column headers, but maybe you JUST want the column names themselves.

Right mouse on the column headers. not in the grid.

Right mouse on the column headers. not in the grid.

Note you need to select which column headers you want copied by selecting at least once cell in the grid. So in the screenshot above I have ctrl-clicked 3 of the 5 columns by selecting their associated cells. Also, this is a fairly new feature, be sure you’re running v3.2.20_09 of Oracle SQL Developer.

Just another stupid copy and paste trick for your collection 🙂

SQL Developer, The Movie!

Tell Others About This Story:

Comments 3

  1. This is really in reply to your previous post on copying data with column headings.

    On Mac OS, you copy with cmd-C and paste with cmd-V.

    However, to copy with column headings is ctrl-shift-C.

    It took me several months to figure that out. Is there anyplace where specific Mac OS keyboard shortcuts are documented?

    1. thatjeffsmith Post
      Author

      99% of the time you would find the keyboard shortcuts defined in the preferences. I’m not sure this one is there though as it’s an extended take on the basic clipboard->Copy action when the focus is on a grid object. I’ll startup my Mac mini copy of SQLDev later this morning and see if I can find it.

Leave a Reply

Your email address will not be published. Required fields are marked *