SQL Editor

This topic provides an overview of the SQL editor in Oracle® Database Navigator plug-in.

As part of editing SQL queries, the Oracle® Database Navigator offers SQL consoles that act like terminals stored locally for every database connection and provide direct interaction with the database in terms of executing queries and viewing results. SQL consoles provide a more focused and streamlined SQL development capabilities and enables you in exploring, retrieving, and manipulating data, and testing sample queries.

Oracle® Database Navigator lets you maintain multiple SQL consoles for a database connection. Additionally, it supports a wide range of databases including MySQL, PostgreSQL and SQLite.

To access an SQL console, from the DB Browser pane, right-click the database connection (root folder) and select Open SQL Console option from the context menu.


SQL console open in SQL editor window

The SQL Console opens in the SQL Editor window on the right-side of the DB Browser pane with SQL statements.


Sample SQL console open in the editor pane

The SQL Console toolbar allows you to perform the following operations on SQL statements:
Toolbar Options Description
Database Logging (DBMS Output) Switch database logging on or off to enable/disable the database logging integration during statement execution. This option is only supported for Oracle databases - DBMS output.
Select Current Schema Select database schema to associate the SQL editor. SQL statement will be executed against the schema you select.
Select Database Session Select database session for the SQL editor. SQL statements will be executed against the session you select.
  • To disassociate the SQL editor from a database connection, select the Disable Session Support option.
  • You can also create a new session and associate the SQL editor to the new database session.
Commit Commit unsaved changes in the SQL statement to the database.
Rollback Rollback unsaved changes in the SQL statement to the database.
Execute Statement Invoke execution of the SQL statement at the cursor.
Debug Statement Invoke debug execution of the SQL statement at the cursor.
Explain Plan for Statement Invoke extraction of explain plan for the SQL statement at the cursor.
Execute SQL Script Invoke execution of the current SQL script using Command-Line Interface of your database.
Options
Additional options available are as follows:
  • Renaming the SQL console
  • Deleting the SQL console
  • Save the changes to the SQL statements to file
  • Create a new SQL console for the database connection
  • Create a new debug console for the database connection
  • Access the Code Editor settings