We often spend a lot of time trumpeting the sexy little widgets in our database tools and overlook the little things that really aid in the development of our applications or even just writing the mundane queries that fill up our day.
I’d like to just spend a quick 10 minutes on letting you know about a cool little feature that Toad for Data Analysis offers for writing your queries in the editor. The technology is usually referred to as one of the following:
- Code Insight
- Code Assist
- Type-ahead.
Basically it boils down to the Toad editor offering to complete the clause or phrase you’re currently working on. It looks at what you’ve typed already and uses its powerful SQL parsing technology (available for Oracle, DB2, MySQL, SQL Server, and now Sybase!) to figure out what should logically come next so you can just select it with your mouse versus wasting another dozen or so key-strokes.
Let’s take a look at 2 very simple examples now.
SELECTs
As you’re working on a SELECT clause:

Notice that Toad for Data Analysis brings up the columns for both tables from the FROM clause. As you mouse over a column it also shows you the underlying datatype!
WHEREs
As you’re working on a WHERE clause:

Notice how we again list the columns available for building out your filtering clause. What’s even more exciting, notice how we are offering to auto-complete the JOIN clause for the two tables listed in the FROM section.
Here’s a more complex example:
