Executing Statements

This topic describes the procedure to execute PL/SQL statements.

The execution engine in the Oracle® Database Navigator tool supports running individual SQL statements and display the results in respective tabs of the DB Execution Console window. To execute an SQL statement in the editor window:

  1. Open the database object from the DB Browser pane containing the SQL statement to edit in the SQL editor.
  2. Write or edit the SQL query statement.
    For example, SELECT * FROM countries;
  3. Click the Execute Statement icon either on the left-hand side navigation gutter (icon appears next to the caret) or from the toolbar menu of the SQL editor window.

    Execute Statement icon

    The DB Navigator - Execute Statement dialog box displays (if configured) with details of the target database connection, schema, and session where the statement will be executed.


    DB Navigator - Execute Statement dialog box

  4. Click Execute.

    The DB Execution Console window opens displaying the results in a dedicated tab. Information about the total number of records fetched and the execution time is displayed. If the execution fails, appropriate error messages also display in the console window.


    Results of Execution in DB Execution Console

You can also extract and view the execution plan for the SQL statement by clicking the Execute Plan for Statement icon on the editor toolbar menu.


Generation of execution plan of statement in progress

The execution plan provides a complete breakdown of the SQL statement with details of the operation performed, cost in terms of resource utilization, projection and predicates and displays it on the DB Console window.


Execution plan for statement