SQL Developer Quick Tip: Take the Guess Work out of NULL

Tell Others About This Story:

There’s a lot of confusion out there about the absence of a value, also known as NULL. It can cause havoc with your queries if you don’t account for it. Some folks confuse it with a blank space in a string. At least SQL Developer can make one thing a bit easier, interpreting NULLs in a data grid.

By default when SQL Developer displays data in a grid, it indicates NULL with {null}. I’m a bit thick in the head though, and I require an extra nudge or two to get the message through to my brain. I have some friends who are purists though and don’t want their tools to show anything that’s not there.

Thankfully this is configurable in the Preferences.

Preferences – that thing you never look at

Nearly every piece of software has a set of options that can be configured by the user to tweak their experience to their liking. Many tools have tons of options that never get inspected, and that’s fine. Here’s a quick tip for the SQL Developer Preferences – use the ‘Search’ box.

So type ‘null’ in the search dialog – but don’t hit ENTER key! That will close the dialog. The search is search-as-you-type, and is wicked fast.

Search as you type preferences, for the win!

Don’t do as I do

I do a lot of demos and presentations. Instead of blindly clicking through screens or slides, I like to make obnoxious tweaks to my software. This gets people’s attention and they’ll usually ask a question or two. One example of this is how I treat NULL in a grid.

There should be no question here, that field is NULL!

So go take a second now and set this option to your personal preferences. And the next time someone gives you a busted report because they don’t get NULL, have them read Tom’s take on NULL.

Zebra Grids + Null Coloring

Prior to version 4.1, there was a problem with asking for the background coloring for NULLs when you were also using the zebra preference for grids.

That’s fixed now 🙂

The 'Zebra' Preference and an Example


Related Posts Plugin for WordPress, Blogger...
Tell Others About This Story:

Similar Posts by Content Area: ,