Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Statement parameters

Miroticey1's profile image Miroticey1 posted 2 years ago in General


good job you're doing with HeidiSQL. It's actually more popular than the commercial DataGrip among my colleagues and me. HeidiSQL is perceived to be more flexible.

One thing where HeidiSQL is lacking though is parameters in statements. We have many statements in applications like this:

SELECT foo FROM bar WHERE baz = :foobarbaz

When you execute this statement in DataGrip, it lets you enter a value which is automatically replaced by DataGrip. This is especially helpful if there are many parameters. In HeidiSQL I use search and replace, but it's somewhat cumbersome. It would be great if HeidiSQL would also support this.

Attached is a screenshot of DataGrip parameter window. It shows the parameter name, real column name (if applicable) and the value that gets replaced.

1 attachment(s):
  • datagrip-parameters
kalvaro's profile image kalvaro posted 2 years ago

In HeidiSQL you can populate parameters in the right pane in the Query tab ("Bind parameters" subtree).

Unfortunately, the implementation is too simplistic and it doesn't behave as bind parameter do in any other tool; it's basically an automated search and replace (for instance, you need to quote strings yourself).

Theo Jager's profile image Theo Jager posted 3 months ago

I understand there is a right pane, and i don't mind quoting my own strings :-)

But it would be great if there was a ( small ) extention



WHERE id = :id #:id=1234

AND name = :name #:name="bob"

this way i can just copy past the sql from the editor into heidisql and run it with the default values

thanks and i realy like heidisql

Please login to leave a reply, or register at first.