Basil Bourque
Basil Bourque

Reputation: 338634

How to execute SQL in the IntelliJ Ultimate SQL Console?

In IntelliJ Ultimate 2017.2, the SQL Console opened from the Database panel lets me enter some SQL.

Unfortunately, when I click the green triangle icon in its upper-left corner, sometimes my SQL executes and sometimes it does not. Sometimes I need to select all the text before hitting the triangle to make it execute, sometimes I do not. Apparently there is some logic or magic trick intended by this tool that escapes me.

➠ How to execute the SQL Console?

screen shot of the SQL Console in IntelliJ 2017.2

The documentation for Database Console says:

Use this icon or shortcut to execute the selected (highlighted) SQL statement or statements.

If nothing is selected, the current statement is executed.

That is not the behavior I see when running on macOS Sierra 10.12.5.

Upvotes: 2

Views: 2171

Answers (1)

CrazyCoder
CrazyCoder

Reputation: 401975

You can control what IDE executes on this action in the Preferences/Settings > Tools > Database > Execute in Console.

Execute in console

You may want to set some of those to the Whole script.

Upvotes: 2

Related Questions