One of the challenges I face as I try to share tips about our software is that I tend to assume there are features that you just ‘know about.’ Either they’re so intuitive that you MUST know about them, or it’s a feature that I’ve been using for so long I forget that others may have never even seen it before. I want to cover two of those today –
- Describe (DESC) – SHIFT+F4
- Floating Panels
SQL Developer and Describe
DESC or Describe is an Oracle SQL*Plus command. It shows what a table or view is composed of in terms of it’s column definition. Here’s an example:
SQL*Plus: Release 220.127.116.11.0 Production on Fri Sep 21 14:25:37 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Oracle Database 11g Enterprise Edition Release 18.104.22.168.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> desc beer;
Name Null? Type
—————————————– ——– —————————-
BREWERY NOT NULL VARCHAR2(100)
You can get the same information – and a good bit more – in SQL Developer using the SQL Developer DESC command. You invoke it with SHIFT+F4. It will open a floating (non-modal!) window with the information you want. Here’s an example:
A few ‘cool’ things you should be aware of:
- I can open as many as I want, and still work in my worksheet, browser, etc.
- I can also DESC an index, user, or most any other database object
- I can of course move them off my primary desktop display
The DESC panel’s are read-only. I can’t drop a constraint from within the DESC window of a given table. But for dragging columns into my worksheet, and checking out the stats for my objects as I query them – it’s very, very handy.
Try This Right Now
Type ‘scott.emp’ (or some other table you have), place your cursor on the text, and hit SHIFT+F4. You’ll see the EMP object open. Now click into a column name in the columns page. Drag it into your worksheet. It will paste that column name into your query. This is an alternative for those that don’t like our code insight feature or dragging columns off the connection tree (new for v3.2!)
SQL Developer’s Floating Panels
Ok, let’s talk about a similar feature. Did you know that any dockable panel from the View menu can also be ‘floated?’ One of my favorite features is the SQL History. Every query I run is recorded, and I can recall them later without having to remember what I ran and when. And I USUALLY use the keyboard shortcuts for this.
But sometimes I still want to see my recall list without having to give up my screen real estate. So I just mouse-right click on the panel tab and select ‘Float.’ Then I move it over to my secondary display – see the poorly lit picture in the beginning of this post.
And that’s it. Simple, I know. But I thought you should know about these two things!
How do you ‘unfloat’ that window?
right click on the floating window menu/title bar, and select ‘Dock’
I’m having issues viewing my SQL HISTORY. It never pops up and when i check the Log, I see an error.
SEVERE 70 0 oracle.dbtools.worksheet.sqlhistory.SqlHistoryTask oracle.dbtools.worksheet.sqlhistory.db.HistoryDB.readHistory(HistoryDB.java:99)
could you help?
Me too facing the same issue. Can anyone help?
It is nice to see and learn not just from the blog itself but from the comments. Now (CTRL+F6) + (ALT+0) are in my toolbox 🙂
The floating, non modal window for DESC is fine, however, I can not navigate to it using keyboard. It does not show in window list (CTRL+F6), not in tabs list (ALT+0), nor can you navigate to it using CTRL+TAB. If you want to close it, you have to get your hands off the keyboard and grab the mouse. However, I found that I can switch to it using ALT+CTRL+TAB (I’m using SQL Developer on Centos 6.3 with Gnome 2, this shortcut lets you navigate through panels on your desktop, I guess other OSes don’t have this). When you get to it by keyboard, than you can not navigate to other tabs using keys, you have to grab the mouse again. Please make it navigable to and keyboard friendly when you are at it.
Similar story is with floating panels (I tested this with Run manager and SQL history “applet”), they do get listed when you press CTRL+F6, however, the applet does not get the focus when you select it. Use it with mouse only.
Can you get SQL Developer “keyboard only” friendly? For example, I can not switch directly from SQL Worsheet to data grid displaying resultset of my query, with a single keystroke. I can get to the data grid (for selecting and copying a cell value, mainly) by typing CTRL+TAB TAB CTRL+TAB TAB (yep! twice!) and then back to Worksheet by CTRL+TAB TAB. There is no such “Worksheet command” such as “jump to datagrid” to assign a key shortcut to it?! Similarily, I can not get to “Script output” tab by keyboard it the tab with query result is displayed.
The topic of keyboard only navigation was brought up many times on SQL Developer forum, but not much has changed in latest releases. Can you see if anything can be done, please? Try to disconnect your mouse and work for a day (no plugging back!) and see how it goes with SQL Developer…
SQL Developer is a very powerful tool for working with data, but it is difficult to work if you have to grab the mouse every 4 seconds. I would like to see SQL Developer become even better than it is now.
So that behavior is a bug. Specifically:
I’ve entered them as such and hopefully you can expect a fix shortly.
I’m on Windows and I can get to the SQL History panel using ctrl+tab, so I don’t know if that’s an issue with CentOS or our generic *NIX distributions.
I’m a keyboard nut, but I also use the mouse quite a bit. I’ll see what I can do to improve this as I know there are many that are all keyboard.
The SHIFT+F4 keyboard shortcut is not defined in the SQL-Developer for Mac OS X. So you either may use the context menu and select ‘Popup Describe’ or change your preferences under ‘Preferences > Shotcut Keys > Popup Describe’. (I hope the english terms are correct, since SQL-Developer forces me to use german, so I have to translate these back to english.)
So you’re right 🙂 Do Mac keyboards come with F keys? I have a MSFT keyboard, so I’m only guessing that’s the issue.
On my home Mac mini I’ve changed it to Alt+D
Thanks for the heads-up and correction Thomas!
Your English is just fine, by the way.
Mac keyboards still have F1-F12 keys (some even have up to F15 keys). But the default mapping of the F keys nowadays is to control volume, brightness and start some other applications – similar to the combination of the FN key and the F keys on windows notebooks.
In order to get standard F keys you have to press the FN key and the F key. Or you can change the default behaviour of the keyboard back to pressing an F key gives you an F key. 🙂
Well, anyway … since we have the option to change the shortcut keys in SQL-Developer, it’s easy to work around the Mac OS X quirks.