As you’re typing…wait, we have to type? Well, just a little bit. Because as it turns out, our modern tools know what we’re going to say, even before we say it!

Let’s take a quick look at our SQL Developer extension in VS Code offer to complete:

  • the schema prefix
  • our table/view
  • columns
  • keywords
If you don’t like how VS Code left justifies that completer box, I don’t either.

So there’s two ways to get the helpers. You can:

  1. do nothing, it just happens
  2. you can ask for Database help with ctrl+spacebar

Option 1 will almost always be good enough, but if you know there’s better advice to come, from say the data dictionary, you can ‘force it’ with the keyboard request.

If you came from SQL Developer “Classic” you’ll remember that the editor there doesn’t support offering completion help based on the contents of your editor. But, VS Code DOES support that. This item alone might be enough to consider making a switch when you’re doing serious coding work.

“letters” is just being offered because it’s already in the editor

We can even get help with our data types when creating a table –

Yummy, BINARY_DOUBLE.

How about PL/SQL?

Yup, that’s supported too!

Let’s try to invoke a PL/SQL program, for example, ORDS.CREATE_SERVICE, from a SQL Worksheet.

I get the list of parameters with their data types

Should we format this code block by default? Leave a comment with your thoughts…

Here’s another one, I’m writing a Cursor block, and I need help with the SQL, can our extension help with that? Note that I have a procedure open from the database, but this would work from any file that our extension recognizes.

That’s a Yes!

But Jeff, that’s not working for me!??

The biggest culprit I’ve seen so far here, is a conflict from another extension. This is more likely if you have a file open and that file type is being ‘claimed’ by another extension. The easiest way to test this is look for other database themed extensions and try disabling them.

You should also see the ‘SQL Developer’ toolbar buttons and connection status artifacts on screen…if NOT, then our extension isn’t active for your file/editor.

Here’s what that looks like for PL/SQL sources –

On a SQL editor, you’d see the Execute Statement, Explain Plan, Execute as Script… buttons.

I don’t like getting all these…extra suggestions!

It sounds like you’re seeing advice pop in from our extension supplied SQL Snippets.

In VS Code Preferences, see this option –

With this unchecked, you won’t get our example code snippets.

What’s that look like, when it’s on? Well, since I have the advice from snippets sorted to ‘bottom,’ I have to look for them, but they’d show like this –

This was just too ‘loud’ for me, so I disabled it. It’s a preference after all!
Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

8 Comments

  1. “Should we format this code block by default? Leave a comment with your thoughts…”

    Yes, please. 😉

  2. Alexander Wagner Reply

    Hey Jeff! I’m loving the extension that you and your team for making this a reality. I was waiting for months trying to get a dark theme to work for SQLDeveloper.

    I’m having an issue with autocomplete in vscode with this extension. For example when I try to autocomplete, it adds the table name or alias twice.

    For example
    Select *
    From Table t1
    Where t1.[autocomplete displays t1.column]

    The output after I press tab or enter is t1.t1.column.

    The expected behavior would be that autocomplete would remove or include previous text and display only t1.column.

  3. Jean-François Brodeur Reply

    Hi Jeff, I have a preference for getting my KEYWORDS capitalized and my table.column in lower caps, is there a way to set it so that the suggestions shows them the way I like them?
    Thanks
    Jean-François

  4. Jeremy Martin Reply

    Hello Jeff. I like the SQL Developer Extension so far. I do have an issue with the toolbar buttons. I am getting all the buttons except for the Compile and Compile with Debug buttons. I see the PL/SQL and a connection a database at the bottom of the screen. I am working with file types of .pkb (package body) and .pks (package spec). I am working with Windows 11 enterprise.

    I tried removing all the extensions I have in VS Code. Then just reinstalling the Oracle SQL Developer Extension for VS Code. But that did not fix the issue.

    I would have posted this in the Oracle forum but there is an issue with my user account preventing me from posting there. 🙁

    • It’s a thing on our side, you only get that interface when opening plsql from the database, not files.

      We’ll add file-based plsql dev support later this year.

      So you’d have to compile the plsql from sqlworksheet (run as script), and then open the plsql program from the tree to get the full plsql feature set.

Write A Comment