Is it possible to run a query separated by empty lines in ADS without having to highlight it?

Hello

Some queries can be very long and I may have several independent queries in a tab in Azure Data Studio.

Is it possible to run a specific query without having to select/highlight all its text and then click Run?

I am looking something like I can run a query independently just by having the cursor somewhere within the text of that query given that the query is separated by empty lines from the other queries.

Thanks!

As far as I know, this is not possible, neither in ADS, nor in SSMS.

An alternative might be to use the Jupyter notebook feature in ADS, where you can run each code cell separately without having to highlight.

1 Like

In ADS this is possible - a simple google search or help for ADS shows that the default option using Ctrl-F5 runs the current query. For SSMS it looks like you need an add-on like SQL Prompt to get the same functionality.

2 Likes