Statement parameters

Miroticey1 posted 9 months ago in General

Hi,

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 posted 9 months 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).

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