Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 376
Basil Bourque Avatar asked Apr 15 '26 01:04

Basil Bourque


1 Answers

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.

like image 181
CrazyCoder Avatar answered Apr 17 '26 22:04

CrazyCoder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!