SQL Developer for VS Code

Last week SQL Developer for VS Code was released (direct link to VS Code extension here). If you're not using VS Code (VSC) I highly suggest you download and install as it's the de facto editor for developers (regardless of programming language).

I've had the fortunate opportunity of beta testing the SQL Dev extension for VSC for a while and as such have a few helpful hints to start using it. Before continuing this article please read Jeff Smith's VSC announcement article as it covers a lot of the key features.

Keyboard Shortcuts

Traditional SQL Developer users are used to the standard keyboard shortcuts (ex F11 for commit). You can view the SQL Developer for VSC shortcuts by going to Code > Settings > Keyboard Shortcuts

The new tab will show all the shortcuts available in VSC. Filter down to oracle sql developer You'll see the list of default shortcuts that you can modify. There's also a lot of commands that don't have shortcuts associated to them which you can configure as needed.

If you can't remember all the keyboard shortcuts you can easily search on the fly using VSC Command Palette and type in the command you're looking for.

Extension Settings

It's always good to look at all the options for each VSC extension that is installed. To view the SQL Dev VSC extension settings go to Extensions then search for @installed sql > click on the gears and select Extension Settings:

Some of key settings to pay attention to:

  • Database › Nls: Sort I like using BINARY_CI more information about this can be found here.

  • Connections › Startup Script: Can reference your login.sql More about login.sql here.

  • Database > Date / Timestamp Formats: I like to include minutes and seconds as well as displaying the month as a string (use Mon ) as shown below

Substitution Strings

If you're running an anonymous PL/SQL block or a query with an ampersand (& ) using the run command (or ctrl+enter) it will prompt you for a the substitution string:

To get around this just use Compile command (open the command palette and search for it). This will run just the block / query that the cursor is in (not the entire sheet).

Query Results: Column Width

If your query has a lot of columns you'll need to select a formatting option. Right click on the row header and select Auto-fit All Columns and select the best option.

Feedback

Given that this is the initial release of SQL Dev for VSC there's a lot of opportunity for community engagement You can post your feedback, suggestions, bugs, etc on the SQL Developer for VS Code Forums.