Keyboard Shortcuts in Oracle SQL Developer

thatjeffsmith SQL Developer 109 Comments

Tell Others About This Story:

The CTRL key, which stands for ConTRoL…aw, the good ole days 🙂

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

  1. ctrl-enter : executes the current statement(s)
  2. F5 : executes the current code as a script (think SQL*Plus)
  3. ctrl-space : invokes code insight on demand

    Code Editor – Completion Insight – Enable Completion Auto-Popup (Keyword being Auto)

  4. ctrl-Up/Dn : replaces worksheet with previous/next SQL from SQL History
  5. ctrl-shift+Up/Dn : same as above but appends instead of replaces
  6. shift+F4 : opens a Describe window for current object at cursor
  7. ctrl+F7 : format SQL
  8. ctrl+/ : toggles line commenting
  9. 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

Search by command name OR the keystroke itself

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

Click on ‘More Actions’ to expose the Import and Export 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!

I know, I know, I forgot your FAVORITE ONE. But, you already know your favorites, yes?

I know, I know, I forgot your FAVORITE ONE. But, you already know your favorites, yes?

For the 5-6% of our users out there who use Macs :)

For the 5-6% of our users out there who use Macs 🙂

Tell Others About This Story:

Comments 109

  1. in my SQL Developer, it is not showing the Short Cut Keys feature.
    So could anyone help that how can i get this feature in Preferences Pane.

    Thanks
    Love Kumar

  2. I can’t seem to map anything to “Zoom in” or “Zoom out” when viewing a Relational model. It’s a real pain having to always find and click the icons with a mouse instead of just using a keyboard shortcut. None of the Categories with a Zoom command seem to map to the relational diagram.

    1. thatjeffsmith Post
      Author
      1. That was quick! Thanks for commenting Jeff!

        I’ve assigned “Ctrl-Equals” to “Zoom 150%”, and “Ctrl-Minus” to “Zoom 50%” under that less-than-helpful name: “Diagram-8888”, but neither shortcut key does anything with my relational model. Only mouse-clicking the actual magnifier with the plus or minus changes the model zoom.

        I even closed out SQL Developer, then re-opened. The shortcut keys I’ve assigned show that they’ve been saved; but they don’t do anything in the relational model.

        Does assigning to any of the Zoom shortcuts in “Diagram-8888” do anything for you when viewing a relational model?

        1. thatjeffsmith Post
          Author
          1. thatjeffsmith Post
            Author
  3. Any way to assign a shortcut to the “Export” command in the results grid? I have set my default export preference as Tab Delimited to Clipboard. So what I am looking for is a shortcut to avoid:

    Right Click > Export > Next > Finish

    Ctrl-A followed by Ctrl-C is similar – except when I do this, I only have the data. I do not have the column headings.

    Thanks,
    J

    1. thatjeffsmith Post
      Author
  4. Re: Grid Filtering ?

    Hi Jeff,

    First off, Thank You for your helpful blog !

    Is there anyway to have Ora SQL Dev 4.0 filter “within the grid” and NOT re-run the query adding the filter logic ? Also, like in Toad, it would be nice to run more than one filter at the same time with boolean logic.

    1. thatjeffsmith Post
      Author
  5. Nice post. I learn something more challenging on different blogs everyday. It will always be stimulating to read content from other writers and practice a little something from their store. I’d prefer to use some with the content on my blog whether you don’t mind. Natually I’ll give you a link on your web blog. Thanks for sharing.

  6. Searching a text in Chrome doesn’t work on this web page (not scrolling the results). It does when MS browser.
    Getting to the point, Version 4.0.1.14, Build MAIN-14.48 and I am pretty new to this editor.
    1. I was trying to comment out some code with Ctrl + /, which is ok, when slash is being used from the keybord, not from NumPad. Why NumPad is not handling that?
    2. I am typing:
    select *[ENTER]
    from[just SPACE]
    now a list of objects is presented starting from ‘a’. I type ‘i’, as I have invoice_tab table. The list of objects disappears, so I type further ‘nv’. Nothing.
    I hit [Ctrl-SPACE], nothing. I type almost the rest ‘invoice_’, I wait a bit (changing focus to this browser), come back, I hit [Ctrl-SPACE] again and after a while a list of objects starting with ‘invoice_’ appears. We have around 10k objects all together. Is it a performance issue? The database connection is not that bad here.
    3.Now I hit semicolon ‘;’ and [ENTER] and start typing further
    select *[ENTER]
    from dba_ob[Ctrl-SPACE] – after a while (rather long one) I get a list with first object on the list ‘dba_obj_audit_opts’. Why, when I further type ‘j’, the list disappears instead of narrowing down the entries presented? Is there a setting to change this behavior, or, is it by design?
    4. I type new line [ENTER] (empty line) , and again [ENTER] and then package name and DOT. I get presented with methods list but only up to starting with ‘G’ letter. How to increase the number of presented entries in the list? My method name starts with ‘P’. So I type P, the list disappears, then after 2 seconds [Ctlr-SPACE] as I was hoping for another hint list. After 3-5 seconds I get a list with 6 entries starting with P. Pretty long. I select my method.
    5. Now I move my cursor one line up (to that empty line). I type the same package name and DOT. Nothing. No methods list (up to G at least), why?
    Are there any limits, dependencies (from a semicolon or an empty line)?

    Forgive my ignorance if this is pretty obvious. I am using standard settings (0.3 seconds in sql worksheet) and cannot see in settings anything obvious.

    1. thatjeffsmith Post
      Author

      Searching a text in Chrome doesn’t work on this web page (not scrolling the results). It does when MS browser.
      Getting to the point, Version 4.0.1.14, Build MAIN-14.48 and I am pretty new to this editor.

      Sorry, I don’t know what you mean by this…it seems to work well for me. I don’t even have MS Exploder installed on my Mac.

      I’m on vacation until Monday, I’ll take a look at your type ahead assistance issues later. At first glance it appears you have the automatic bit disabled, or you have the filter in place – it prevents an obnoxiously large list of objects from appearing automatically.

      To troubleshoot, observe the Log > Statements panel, you can see us query the data dictionary whenever you invoke the code helper.

      1. I have the same problem with Firefox (all versions incl 50.0).
        If i do to find something on this page or any page of thatjeffsmith.com, i get the box with the up and down arrow and the highlight All button etc.. But pressing on down arrow doesn’t bring me to the place I’m trying to find.
        That’s very sad.

        1. thatjeffsmith Post
          Author
  7. Greetings.

    Is there a shortcut for “Block Selection” since sometimes I need to disable this to get some kind of column mode?

    Or maybe is there a better way to remove text from first 5 columns
    and all rows where column selection mode works perfectly.

    Best Regards.
    Piotr

  8. Hello Jeff,
    Repeating the same query as another user asked below, couldn’t find anywhere.. Hope you can help..

    Is there a shortcut to close the Query Result / Script Output?

    I know I can jump into query result tab by pressing Alt+PageDown. I would like to close the result tab immediately after I check the results, using a shortcut key.

    Consider this scenario..
    1: You are developing a select query and you may have to run it multiple times to develop it and make sure that the query is correct.
    2: However when the query result is showing, there isn’t enough room to completely see the query you are developing.
    3: You will have to close the Query Result / Script Output each and every time.
    4: Now you wish there was a shortcut to do it easily.

    Thanks in advance.

  9. Hello Jeff

    Nice work

    What can i do to organize my sql files .

    I think my sql-tab at the top has more than 60 Files open ( and the reason that you can’t rename the files it makes the thing not easier )

    Are there any addins availiable to handle this in an smoothly way or do you have any tipps for this

    best regards john

    1. thatjeffsmith Post
      Author

      We have built in source control support, including for Subversion. Create a SVN project for your work. Version AND organize your work. Then use the Team panels to work with your files/code.

      Or at least, that’s one way to go.

  10. Hi Jeff,

    I have been using SQL developer for quite a few years and firstly, thank you. Its an excellent product. I now have 4.1.3.20. I was wondering if its possible to add a button to reconnect on the pane where we have the execute, block execute etc., buttons. Most of the time I work on with my worksheet maximized. So, at times, the connection times out and I need to navigate to connection view, right click on the connection and then click reconnect.

    Do, let me know if I have missed an existing shortcut!

    Thanks.

    1. thatjeffsmith Post
      Author
  11. Hi,

    Please tell me the shortcut for toggle comment selection, I need to comment the word only and not the entire line.
    eg: /* word */

    Is it possible to create the customized the keyboard shortcuts

    1. thatjeffsmith Post
      Author
  12. Ctrl-Right navigate 1 word to right.
    How do you change the definition of a *word* from current -> [a-zA-z]+ to
    \w+ , this would include underscore “_”.
    Ideally can we make word definition configurable ?

    1. thatjeffsmith Post
      Author
  13. Anyone know how to get it to use the End and Home keys on a non-apple keyboard (on mac) to refer just to the current line rather than the whole document? Other apps do this correctly, but SQL dev behaves differently 🙁

    1. thatjeffsmith Post
      Author
  14. Can just input “sf” then “space” to automatic replace sf to “select * from”?

    PLSQL can do that but how to use it in sqldeveloper?

    Mike

    1. thatjeffsmith Post
      Author
    2. Hi. I recently tried this. Follow the following steps for adding your own shortcut keys :

      1. Navigate to Shortcut keys : Tools –> Preferences –>Shortcut Keys.
      2. Search for Other(Category).
      3.Under the category, find Code Template and assign a shortcut key for the same(Shift+Space is not used).

      4. Navigate to SQL Editor Code Template : Tools –> Preferences –>Database –>SQL Editor Code Template.
      5. Create your own template.

      After following the steps mentioned above, you can enter the template and press the shortcut key.

  15. Great Tips from a blog aweosme blog. Really helpful informative points. thanks for the share Jamie. The best thing was I found out your blog when i was searching for SEO companies in London to see which companies comes up on the first page. Good to see true colors from the top rank SEO firm.

    Thanks for the share Jamie. Will be around reading some more posts to see what best you guys have.

  16. Hi Jeff,

    I often get lists of data that people want me to query, by way of an IN clause, is there a shortcut to format the list correctly? currently I drop in into excel first and run a formula over it.

    for example:
    ABC
    DEF
    GHI

    into format
    (‘ABC’,
    ‘DEF’,
    ‘GHI’)

    1. thatjeffsmith Post
      Author
    2. use excel editor and paste all the values in one column and keep ” before this column and after this column
      and use concatenate() function in EXCEL so that all will concatenate as required.. 🙂

  17. I love it how when I type Alt+F to bring up the File menu, an “f” gets typed in the editor window. I’m on version 3.2 and it’s like nobody has ever tried Alt+ for menu access before. Incredible! Inspires great confidence!

    1. thatjeffsmith Post
      Author
      1. Thanks for your prompt and kind reply to the message I wrote when I was being a “snarky Jeff”. I’ve downloaded 4.1. It looks and feels a lot nicer all around, and Alt+F works as expected.

        Thanks again!

        1. thatjeffsmith Post
          Author
  18. When i try to use shift +f4 then it shows “No object found”,but that object exist in my schema. i already assign shortcut to concerned others>>opoup descibe.

    My Current version was 4.1.0.19.

    How can i enable that shortcut .

    1. thatjeffsmith Post
      Author
  19. Hello Jeff,
    Is there a shortcut to close the Query Result / Script Output ?

    It would be easy to work with if there were these..

    Consider this scenario..
    1: You are developing a select query and you may have to run it multiple times to develop it and make sure that the query is correct.
    2: However when the query result is showing, there isn’t enough room to completely see the query you are developing.
    3: You will have to close the Query Result / Script Output each and every time.
    4: Now you wish there was a shortcut to do it easily.

    agree?

  20. Thanks for the great work. I strongly suggest to add one command: run single statement under cursor.

    I often need to write several queries in one SQL worksheet, and very often the one under cursor (i.e. being developed) needs to run. If this command is added to SQL developer, I can hit another command (e.g. Alt+Enter to run just one SQL). It will be so convenient that I do not need to select the statement before executing it.

    To be specific, if a statement has already started (i.e. its first non-blank char) before the blinking cursor, then run that statement, otherwise, run the statement before the blinking cursor. So I can hit a key to run a statement just after typing the ending ‘;’.

    1. thatjeffsmith Post
      Author
  21. Is there a short cut to highlight a query/paragraph ? Something like “Shift+Ctrl+Up or Down Arrow Keys – Select paragraphs” in common windows applications.

    thanks.

    1. thatjeffsmith Post
      Author
    1. thatjeffsmith Post
      Author
  22. Is there any way to export some table in separate file but the name of each sql file should be in Lowercase.

    1. thatjeffsmith Post
      Author

      tables to sep files is easy, use the database export

      not sure you can force lowercase file names as their automatically generated though

      you could write a shell script to rename them for you afterwards perhaps…

  23. 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.

    1. thatjeffsmith Post
      Author
  24. 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.

    1. thatjeffsmith Post
      Author

      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.

  25. 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

  26. 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?

    1. thatjeffsmith Post
      Author

      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

  27. 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

    1. thatjeffsmith Post
      Author
        1. thatjeffsmith Post
          Author
      1. 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

        1. thatjeffsmith Post
          Author
  28. 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.

    1. thatjeffsmith Post
      Author
        1. thatjeffsmith Post
          Author
  29. 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 /.

  30. 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?

    1. thatjeffsmith Post
      Author
        1. thatjeffsmith Post
          Author
    1. thatjeffsmith Post
      Author
    1. thatjeffsmith Post
      Author
  31. 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

    1. thatjeffsmith Post
      Author
      1. 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

        1. thatjeffsmith Post
          Author
          1. 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.

          2. thatjeffsmith Post
            Author
  32. 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!

    1. thatjeffsmith Post
      Author
  33. 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!

  34. 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.

    1. thatjeffsmith Post
      Author
  35. 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.

    1. thatjeffsmith Post
      Author

      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.

    1. thatjeffsmith Post
      Author
    1. thatjeffsmith Post
      Author

      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?

  36. 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.

    1. thatjeffsmith Post
      Author
  37. 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.

      1. thatjeffsmith Post
        Author
        1. 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 +

Leave a Reply

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