SQL Developer’s code editors try to help you out.
They’ll show you two categories of informational advisories:
- there is a problem with this code
- we think we can help you with this code
These are shown by various styles of underlined text in the editor.
Let’s go through the list of what’s available as of version 18.1 – to be released, soon 🙂
Actually all of these items, save 1, are available right now in version 17.4, and have been for at least several years.
We think there’s a problem with your code.
This is the parser saying, we see potential issues. We don’t think this is going to run successfully.
In this example, the parser is telling us two different things. To see what, simply mouse over each underlined bit of text.
If you click on the ‘object_type’ blue text there, we’ll automatically add the GROUP BY clause for you.
The other issue is with what you’re trying to query from – this was new for 17.4.
While we were typing we went and peeked into the data dictionary for you. We couldn’t find anything called ‘USER_OBJECT.’
And also new for 18.1, if you’re working with DYNAMIC SQL, we’ll try to identify potential SQL Injection vulnerabilities.
Remember now, these aren’t errors from the database. They might even be false positives – that is, there might not be a problem here. But we thought you should know about it.
Let’s look at two more of these helpers.
The first will be available for all Oracle connections – ‘STAR EXPLOSION.’
You can use this to ‘peak into’ the columns, or you can click on the list and we’ll replace the * with the column list.
The second one is available for 12c and higher versions of the database, and is a feature known as SQL Text Expansion.
Again, if you click on the blue text, we’ll replace your code with the ‘real code.’
No worries if you change your mind, both of these can be undone via the editor’s UNDO feature.
I can’t see these, or I simply don’t WANT to see these!
To turn these off –
To make them easier to see, for you –
You want to look for the ‘disconnected join graph’ item. This is the parser’s way of saying, your math doesn’t add up correctly.
Not hints, but problems.
Syntax issues –
Click on the bookshelf icon, and we’ll take you to the Oracle DOCS on how to write a SQL statement.
Configure those here:
PLSQL Errors –
And that color/line style is also configurable, but as PLSQL Errors.