SQLab for VS Code
Oracle SQL and PL/SQL in VS Code, offline and without installing Oracle. Made for students
practising for an Oracle course: errors come with Oracle's real code and a plain explanation.
Run
|
Windows / Linux |
macOS |
| Run the statement under the cursor (or the selection) |
Ctrl+Enter |
⌘+Enter |
| Run the whole script |
Ctrl+Shift+Enter or F5 |
⌘+Shift+Enter or F5 |
The ▷ buttons at the top of a .sql file do the same. Results open beside the editor: one table
per query, then the script output (messages, ORA- errors with a hint, DBMS_OUTPUT). Click a line
number to jump to it.
Databases
Databases are .db files in the .sqlab folder of your project. Click the database name in the
status bar to switch, create a new one, or create the course database commandes
(client, article, commande, ligne_cmd) with its data.
Like Oracle, INSERT, UPDATE and DELETE wait for COMMIT (the status bar shows
uncommitted); ROLLBACK undoes them. Like SQL*Plus, pending changes are committed when you switch
database or close VS Code.
While you type
- Problems shows what Oracle would refuse:
GROUP BY mistakes, JOIN without ON, a missing ;,
PL/SQL errors, each with the ORA-/PLS- code and a hint.
- Autocomplete knows where you are: tables after
FROM, the statement's columns in SELECT and
WHERE (with their table), alias. columns, record fields in PL/SQL, %TYPE/%ROWTYPE/%FOUND…
What it emulates
SQLab runs Oracle's SQL and PL/SQL on SQLite: Oracle data types and functions, (+) outer joins,
MERGE, sequences, constraints, views, transactions, blocks, cursors, exceptions, procedures,
functions and triggers. It is a learning tool: check important work on a real Oracle database.
Settings: SQLab: Language (English / French hints), Strict Oracle, Live Checks.