views:

139

answers:

2

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 ';'?

+1  A: 

Unfortunately no there is no such keyboard shortcut in the MSDN list of keyboard shortcuts for SMSS, and I don't see any way of recording a macro to do so. The only solutions I've found require creating an add-in which is quite a bit of work for a little savings.

Daniel DiPaolo
Thats too bad. I can live with highlighting the query, I just wanted to save some keystrokes. Thanks for the help
mawaldne
A: 

In SQLBase, I used to just press CTR+ENTER to run the SQL statement the cursor is currently standing at. But Microsoft does not seem to provide these little yet important things.

Michael Habib

Michael Habib

related questions