Search code examples
sqljetbrains-idedatagripsnowflake-cloud-data-platform

How to run query with parameters in DataGrip?


In DataGrip, how can I pass parameters to SQL query? Say I have a query:

select * from table where date >= ?

Then how can I bind the variable here? When I open the parameters pane, i.e. click the P button here.

enter image description here

I see

No parameters present

Or:

enter image description here

Where should I set the parameter value?


Solution

  • Just run it via Ctrl+Enter! enter image description here The parameter pop-up will appear.