What keyboard shortcuts should EVERY Oracle SQL Developer user know? How do you find new shortcuts to master, and how do you change them to match ones you’ve already learned in other tools?
These are the driving questions for today’s post.
While some of us may be keyboard ninjas, and others are more driven to use the mouse – everyone has probably picked up a few strategic keyboard shortcuts over the years. For example, I’ve personally JUST memorized the Cmd-Shift-4 ‘trick’ in Mac OS X. And of course we all know what F1 does, right? Right?!?
Here are a few more keyboard shortcuts to commit to memory.
My Favorite SQL Developer Shortcuts
- ctrl-enter : executes the current statement(s)
- F5 : executes the current code as a script (think SQL*Plus)
- ctrl-space : invokes code insight on demand
- ctrl-Up/Dn : replaces worksheet with previous/next SQL from SQL History
- ctrl-shift+Up/Dn : same as above but appends instead of replaces
- shift+F4 : opens a Describe window for current object at cursor
- ctrl+F7 : format SQL
- ctrl+/ : toggles line commenting
- ctrl+e : incremental search
And New for Version 4.0…
- Alt+PageDown: Will take focus from worksheet edit area to results pane. Alt+PageUp takes you back up in the opposite direction
Configuring Keyboard Shortcuts in SQL Developer
Tools > Preferences > Shortcut Keys
Some tips…
- Sort by category
- Pay special attention to the ‘Code Editor’ and ‘Other’ categories
- Mind the conflicts when you change the defaults
- Be nice – share! You can save your new mappings with your co-workers using the Export and Import buttons
When I get ‘bored’ or if I think I might be missing something, I peruse the Code Editor and Other categories, again! I’ve picked up quite a few cool editor tricks here. Then I blog about them, like they’re ‘magic.’ #EvilLaugh
But the main tip is this – don’t let your previously memorized keyboard shortcuts SHORTCUT your usage of SQL Developer. If your fingers have already memorized some keystrokes, just re-program SQL Developer to match!
What’s your favorite shortcut?
I’ll use the most popular shortcut mentioned in the comments to round out my Top 10 list above!
141 Comments
SQL Developer 1.5.5 … looking for a way to do this via keyboard, not using mouse
I can navigate in the left hand window pane to a table using up down arrows and highlighted in blue when selected.
What I am currently doing… Right Click on Table (using mouse) ¬ Export ¬ Csv
But I am unable to do the same using only the keyboard.
If there is a way to do this (without the mouse) I would like to know.
Upgrade to version 4.1, and then we’ll talk.
Thank u very much for giving alternative solution of customized shortcuts.
Hi Jeff,
Is there a way in SQLDeveloper with embedded DataModeler to assign a shortcut key to a DataModeler command? For example, in the standalone version of DataModeler Shift-Alt-t brings up the Types Administration tool, but in SQLDeveloper it does not. I’ve looked in Tools->Preferences->Shortcut keys but cannot find any DataModeler shortcuts within SQLDeveloper. I’ve also tried exporting the shortcut maps from SQLDeveloper and DataModeler to compare them.
Or is this one of the reasons for maintaining the standalone version of DataModeler for jobs that take more than 15 minutes?
Thanks in advance.
John.
It’s not available. I think for any serious user, they should be taking advantage of the stand-alone version of the Data Modeler – if only so it doesn’t have to share JVM memory space with SQL Developer itself.
Hi Jeff, sorry if I am asking something you have already posted, but I couldn’t find how to copy the formatted code to another app. I mean, if I copy the formatted code to MSWord it appears plain text without format (font, color, bold, etc).
Thanks for all
Hi Smith
How do I create a shortcut key such that when I press say “F2”, it will insert 4 tab spaces?
how do we run just the current statement? Ctrl-Enter tries to execute all the statements in teh worksheet but I want to just run the statement where the cursor is…is there a shortcut?
exactly that – ctrl-enter
but
you have to use statement delimiters (;)
otherwise, we don’t know where a query starts and where a query ends
you can also highlight what you want to run and use ctrl+enter
Ctrl+'(Single Quote)
Could be very beneficial if you could also add a simple command like ToLower or ToUpper (today exist only To Upper/Lower/Initcap) and assign it to a shortcut
You can assign shortcuts to Upper and Lower – in the preferences, look for ‘Convert.’ There’s not one for InitCap, so you’ll have to keep using the existing toggle.
how to deformat the sql code in sql developer and toad
deformat?
If you mean ‘unformat’ or undo a format you just did, you can just do an ‘undo’ or ctrl+Z in SQL Developer
Jeff,
The only shortcut command that has ‘Convert’ in the name is called ‘Convert …’ and seem to do nothing at all? Can you please elaborate on how to assign seperate keys for Lower and Upper Case instead of the toggle?
Version Details:
Java(TM) Platform 1.7.0_55
Oracle IDE 4.0.3.16.84
Versioning Support 4.0.3.16.84
Thanks,
Martin
don’t search on convert, search on ‘Upper’
Hi, I am using SQL Developer 1.5.5 and there is no ShortCut option in the Tools -> Preference. I am used to switching the Result Windows from MS SQL with the ‘Ctrl + R’ shortcut. Do you know how I can setup a shortcut for this in Oracle SQL Developer 1.5.5?
This will be very helpful if I run a query, view the result, then toggle the result window off so that I will have more view on the query and work on the query again.
Thank you very much in advance.
Yeah, your version is like from 2008…go get a newer version and try again.
What is it in the newer version?
And New for Version 4.0…
Alt+PageDown: Will take focus from worksheet edit area to results pane. Alt+PageUp takes you back up in the opposite direction
more about kb shortcuts here
http://www.thatjeffsmith.com/archive/2012/11/keyboard-shortcuts-in-oracle-sql-developer/
To comment multiple lines:
Ctrl+/ or Ctrl+? (the Key on left of shift key). It does not work if I try the individual key for /.
Hi Jeff,
I’m trying to move my colleagues to SQL Developer. But they hate using mouse in IDEs. For now we can’t find a shortcut for minimizing ‘Query Results’ window. Is there something for that?
There’s not, and I’ve logged that as an accessibility bug.
Jeff,
Thank you for quick reply.
By the way a WA was found on https://community.oracle.com/thread/2189756. Results panel can be resized by F8 -> (Up/Down/Home/End).
But after hiding panel does not appear when next query is executed.
We are looking forward to resolving this accessibility issue.
ah, cool workaround…but having to go to the results panel first is a PITA.
I would expect it to stay hidden until you unhide it though.
Hi Jeff,
We can’t find a shortcut for minimizing/maximizing ‘Query Results’ window or switch between full size windows Worksheet/Result.
We don’t have one. I’ve logged it as an accessibility bug. Remind me to check on it next week when I’m back from vacation.
Hi Jeff,
Please add a shortcut for minimizing/maximizing ‘Query Results’ window or switch between full size windows Worksheet/Result.
We tried.
Hi Jeff,
What about block selection keyboard shortcut? Still can’t find it on 4.0.3.
Thanks!
It still requires a toggle off of the Edit menu drop list.
I am working on version 3.2.20.09.
Time to upgrade.
Hi Jeff,
I am wondering if we can add new shortcut to the list of shortcuts already mentioned in the Shortcut tab. For example I want a shortcut for a command like
“select * from”
Suppose the short cut key is “Shift + S”. If I press the shortcut key then it should write “select * from” on the opened SQL file. Is this feature possible to implement.
I also want to know is there any feature that will help to add more desired commands and desire shortcut keys?
Regards
Anakar Parida
I use this feature to program in all of my frequently used snippets – then it’s plugged into the Ctrl+Spacebar code insight feature.
Hi Jeff,
Thanks a lot. One more information I wanted to know. When I hit “CTRL + Spacebar” I get only 3 records and then a “..” below it. When I click on the double dot “..” then it expands to full length. Can I increase the number of records shown when I hit “CTRL + Spacebar” like somewhat 6 records instead of 3.
Regards
Anakar Parida
That’s not configurable today.
Thanks Jeff.
One thing I noticed is suppose there is a id “ssf” whose template is “SELECT * FROM table” . When I write ssf and then hit CTRL+ Spacebar I get the list of result and then on choosing one of them the id still remains and the template gets appended to id like “”ssfSELECT * FROM table”. Is there any configuration issue? Because in the video that you referred earlier use to replace the whole id with template.
What version are you running?
That one works great for me in v4.0.2.
When running a query in a SQL window, the query is in the top part of the screen, and the result set is shown in the bottom part. How can I move my cursor from the top part to the bottom part without using the mouse?
Thanks!
Alt+PageDown
I renamed my sqldeveloper install developer to something different, reinstalled, found my user files directory in appdata\roaming and renamed, and still had no luck getting this to work – however, I am on a limited user account and I am sure if the program tried to write to the registry that it would not have “stuck”.
I’ll try a fresh install with admin rights and see if that works. Thanks for the help and happy 4th!
Thanks for your quick reply, Jeff. As for what happens, sometimes I will get a message at the bottom of the screen that says press control+click when resting on an object, but it quickly flickers away. Nothing happens at all when I press control-click. I can press shift+f4 but the data tab is not present on that screen which is what I am trying to get to quickly.
I think we are going to test a dual Java installation so we can get to SQL Developer 4.
Thanks for your help.
It’s actually ctrl-Mouse-hover…wait a sec, it will turn blue/underline THEN click
I am evaluating SQL Developer 3.2 because my organization uses Java 6 for a number of critical software systems, so for now it looks like going to SQL Developer 4 and Java 7 are out of the question.
So, my question is, how can I pop up a describe window while I have the cursor resting in a table or view name in the worksheet and also have the data tab available? Others have told me that the solution is ctrl+click on the table or view name, but this simply does not work for me.
Thank-you for your reply.
That’s really the best way to get what you want – what part of the ctrl+click doesn’t work? Do you not get the hyperlink, or do you get that, but you can’t click to open the object?
Also, you can install SQL Developer 4 with Java 7 embedded and it won’t effect any of your other Java installations – or their programs.
How To enable ENTER , Arrow Key on Oracle Developer Worksheet Area..?
I’m talking about multiple worksheets and editors in SQL Developer. Thanks
Try Ctrl+Tab or Ctrl+F6/Ctrl+Shift+F6
Hey Jeff,
I went through the worksheet shortcuts and I couldn’t find one for navigating between the worksheet tabs. Did I miss something?
When you say worksheet tabs, do you mean like the Worksheet and Query Builder tabs in a worksheet, or do you mean between multiple worksheets and editors you have open in SQL Developer?
Funny, while trying the shortcuts you recommended as useful—and they are, indeed—I discovered a new one I like very much.
On the OS X release most CTRL+something shortcuts are mapped to CMD+something. So I tried CMD+e while having a word marked. SQL Developer instantly jumped to the next occurrence of this word. Well, that’s a handy feature when navigating through code.
I tried the same at work, where I use the Windows release of SQL Developer – i.e. CRTL+e. Unfortunately, in the Windows release I was presented with a dialog box requesting an input value … even though I marked a word before.
A quick look at the preferences showed, that CMD+e is mapped to ‘Weitersuchen nach unten ab Cursorposition’ (something like ‘Continue search downward from cursor position’). Which is mapped to STRG+F3 under Windows.
So to make a medium length story even shorter … I’d like to recommend the shortcut
• CMD+e
• STRG+F3
for fast code searching. Simply mark something and hit STRG+F3.
That is indeed very cool! Ctrl+F3 automatically jumps to the next occurrence of the selected word!
F9 – to execute/view in grid.
1, 2, 3, 6, 7 and 8 I have down. The ones I need to commit to memory are 4 and 5. I don’t like incremental search, I like the full blown search and set the highlight all instances and start from beginning to on. Or something like that.
I’d say Ctrl+’ to change case.
This one is incredibly annoying, as it doesn’t work with international keyboard layouts.
What doesn’t work?
on an international keyboard, the quote is defined as ‘ followed by , As a result CTRL+’ doesn’t work as according to SQL developer the quote is never pressed.
Luckily I just found the workaround where you can map your own shortcuts. (Tools – Preferences – Shortcut Keys), and I now have it mapped to (the otherwise unused) CTRL-Numpad +
That is ‘ followed by [space]
sorry about that.