In Oracle SQL Devleoper, when I copy the results, how can I copy the column headings too?
For example, I don't want:
doucette matthew xona.com etc.
I want:
lastname firstname url etc. -------- --------- -------- ---- doucette matthew xona.com etc.
You can copy the column headers by selecting the columns in the columns list on the left, and then copying with Edit > Copy As Text (not Edit > Copy). Then, select the first row and then Edit > Paste.
Select cells from the columns you want to copy (CTRL+Click), choose "Copy selected Headers" in Results grid context menu and column names will be copied to clipboard. This action creates a comma-separated list that can be pasted wherever you need.
Today's Quick Tip: Want to just copy column headers from a query or table? Right-mouse on the column headers (not the grid itself) and select 'Copy Selected Column Header(s). If you want to copy rows WITH column headers to the clipboard, use Ctrl+Shift+C instead of Ctrl+C.
To select column names of a given table you can use the following query: Select column_name from user_tab_cols where table_name =3D'TABLE_NAME'; Remember the table name should be in capital letters.
I found the answer on https://forums.oracle.com/forums/thread.jspa?threadID=2162606. Once you have selected the results (Ctrl +A) then use Ctrl + Shift + C to copy, this will copy the headers aswell.
Regards
In SQL Developer 3.0.04, once you have run your query, right click on the results grid and select export....
Complete the dialogue box as follows.....
Select next, then finish and then paste into the destination program
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