In SQL Server 2008 Management studio, I can hit F5 to execute everything in the current query window. I can also highlight a query, and hit F5 to run that highlighted query.
Instead of having to highlight a query, is there a way I can run the single query my cursor is on, or run a query my cursor is on up to a the first ';'?
Shift + Home will do the job perfectly.
To partially execute a query In SQL Server Object Explorer, double-click PerishableFruits under Views to open it in Transact-SQL editor. Highlight the SELECT p.Id, p.Name FROM dbo. Product p segment in the code, right-click and select Execute Query.
In options you can configure line numbers to be displayed, then you can just click on a line number, which will highlight the whole line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With