IntelliJ IDEA 2026.1 Help

Code editor tips and reference

Productivity tips

View history of a query console

  • In a query console, right-click any area and select Local History | Show History.

    For more information about local history of a file, refer to the Local History topic.

Apply a code style in the editor

  1. Right-click any area or a selection of code in the editor and select Reformat Code. Alternatively, press Ctrl+Alt+L.

  2. Select the scope.

  3. Click Run.

Apply a code style in the editor

View the file path of a query console

  • To see the details of a file, hover over the query console tab.

  • Press Alt+F1, select Project View and press Enter.

    Navigate to a query console  from the Select In window

Edit data in INSERT statements as a table

  1. Select INSERT statements that you want to edit.

  2. Right-click the selection and click Edit as Table.

    Edit data in INSERT statements as a table
  3. In the table editor that opens, make necessary changes in the table cell. Press Enter to confirm.

Reference

Context menu

In the code editor context menu, use the following actions to increase your productivity:

Edit as Table

In INSERT statements, opens the editor for working with the data in a table format.

Change Dialect (<CurrentDialect>)

Oracle only. Change the SQL dialect. Select a dialect from the list.

Explain Plan | Explain Plan

Shows an execution plan (or explain plan) for the current statement. The result is shown in a mixed tree/table format on a dedicated Plan tab.

To build a diagram of the execution plan, click the Show Diagram icon Show Diagram on the left of the Plan tab, or press Ctrl+Alt+Shift+U.

To build a flame graph, click the Flame Graph icon Flame Graph.

Explain Plan | Explain Analyse

Executes the statement and then shows an execution plan (or explain plan) for it.

the Execute icon Execute Ctrl+Enter

Execute the current statement or the sequence of selected statements.

the Execute icon Execute Selection as Single Statement

For a code selection, execute the chunk of code as a single SQL statement.

the Execute to File icon Execute to File

Execute the current statement and save results in a text file. Select the output format and specify the file location and name.

Run 'query console' Ctrl+Shift+F10

(Query file only.)

Execute all the statements in the query filele%.

Diagrams | Show Diagram Ctrl+Alt+Shift+U

Opens a diagram in a separate editor tab.

Diagrams | Show Diagram Popup Ctrl+Alt+U

Opens a diagram in a popup.

Toolbar controls

Icon

Action and shortcut

Description

the Execute button

Execute

Ctrl+Enter

Execute selected SQL statement or statements.

If nothing is selected, the current statement is executed.

the Explain plan icon

Explain Plan

Open the Explain Plan actions menu.

For more information about functionality, refer to the Query execution plan topic.

the Browse Query History button

Browse Query History

Ctrl+Alt+E

Open a dialog that shows all the statements that you have run for the corresponding data source.

See also, Use the Query History dialog.

the View Parameters button

View Parameters

Open or close the Parameters dialog.

For more information about user parameters, refer to the Run queries topic.

the Open Query Execution Settings button

Open Query Execution Settings

Open the Tools | Database | Query Execution section of the Settings dialog to view or edit the query execution settings.

For more information about these settings, refer to Query Execution.

In-Editor Results

Toggle the display of query result within the code editor of query console.

For more information about the in-editor results, refer to In-Editor Results.

Transaction mode

Transaction Mode

and

Transaction Isolation

Select the isolation level for database transactions and the way the transactions are committed.

  • Auto: the current transaction is committed automatically when you submit your local changes to the database server.

  • Manual: the changes submitted to the database server are accumulated in a transaction that can either be committed or rolled back explicitly by means of the Submit and Commit icon Submit and Commit or the Roll Back button Roll Back buttons on the toolbar.

For more information about database transaction modes and isolation, refer to Submit changes to a database.

the Commit icon

Commit

(For the Manual transaction mode.) Commit the current transaction. This button is available only for the manual transaction mode. See also, transaction mode and isolation.

the Roll back icon

Roll back

(For the Manual transaction mode.) Roll back changes. This button is available only for the manual transaction mode. See also, transaction modes and isolation.

the Cancel Running Statements icon

Cancel Running Statements

Ctrl+F2

Terminate execution of the current statement or statements.

Playground

File Resolve Mode

Select the resolve mode to manage the context that database objects in your code are resolved to.

  • Playground: default mode for query consoles. All the database objects are resolved to the same context.

  • Script: default mode for local SQL files. The USE SQL statement (SET search_path TO for PostgreSQL) overrides the default context that the database objects are resolved to.

For more information about the resolve modes, refer to Resolve modes.

the Enable DBMS_OUTPUT icon

Enable DBMS_OUTPUT

(Oracle and IBM Db2 LUW only) Toggles DBMS_OUTPUT for the query console.

the Generate Code with AI icon

Generate Code with AI

Opens the input field for your prompt to AI Assistant.

For more information about AI Assistant in-editor code generation, refer to the AI Assistant documentation,

the Schema icon <schema>

Switch current schema

Select the default schema or database. For PostgreSQL, Amazon Redshift, and Greenplum use the <schema> list to form the schema search path.

For more information about about default schemas, refer to Set the default schema.

09 March 2026