- Open the Database Console for the data source of interest.
-
Click the Properties button
on the toolbar. - In the Database Console Properties dialog that opens, select the General tab.
- Select the desired dialect from the SQL Dialect list and click OK.
When typing an SQL statement, you can view parameter information on-the-fly or by pressing Ctrl+PCtrl+P. PhpStorm informs you about the type of required parameters in a tooltip.

You can use parameters in SQL statements and specify which values should be used in place of these parameters when running the statements:
- When typing a command, enclose the parameters in #, $, or ? characters.
-
In the Parameters pane, specify the values to substitute for the corresponding parameters at command execution.

Do one of the following:
- Place the caret at the desired name and press Ctrl+BCtrl+B. The corresponding table and column are highlighted in the data source for which the console was launched.
-
With the CtrlControl key pressed, hover the mouse pointer over the reference to a table or column.
So doing, the corresponding table or column declaration is displayed in a tooltip, and the reference turns to a hyperlink.
Click the link to jump to the declaration in the data source.

You can run the SQL statements one at a time, or execute a number of statements that follow one another in the console at once:
-
To execute a command at the caret, press Ctrl+EnterCtrl+Enter or click
on the toolbar. -
To run several consecutive commands, select them in the console. Then, press Ctrl+EnterCtrl+Enter or click
on the toolbar.
Tip
You can prepare a script in an SQL file, copy and then paste its contents into the Input pane.
When working with the Input pane of the Database Console tool window, you can browse the executed SQL statements one by one by moving to the previous or next statement:
- To navigate to the previous statement, press Ctrl+UpCtrl+Up.
- To navigate to the next statement, press Ctrl+DownCtrl+Down.
When working with the Input pane of the Database Console tool window, you can open the history dialog to see the executed SQL statements all at once.
To open this dialog:
- Press Ctrl+ECtrl+E.
In this dialog, you can:
- Navigate through the list of the executed statements using the UpUp and DownDown arrow keys.
- Remove the statements from the history. To delete a statement, select (navigate to) the statement to be deleted and press DeleteDelete.
-
Copy the statements to the Input pane. To copy a statement, do one of the following:
- Double-click the statement to be copied.
- Select (navigate to) the statement of interest and press EnterEnter.
- Select the statement and click OK.
As a result, the history dialog closes and the selected statement is copied to the Input pane.

