Add a Keyboard Shortcut that Executes the Statement where the Cursor is placed
Having to select statements by clicking and holding the mouse is just bad ergonomics. Request to have a keyboard shortcut which runs the current sql statement. The current sql statement is defined based on where the cursor is placed. For example, proposed shortcut runs only runs a single sql statement to the next semicolon. This shortcut would be an equivalent to Oracle's SQL developer's ctrl + enter shortcut. Note that this is probably the most used shortcut in SQL Developer and not having an equivalent on SQL Server Management Studio is disappointing. I know that not everyone ends their statements with semicolons but they can carry on manually selecting what they want to run and then pressing F5. But having a shortcut for running the current sql statement would make of a lot of SSMS users extremely happy.
We’ll look at this for future release.
Is there an ETA on this feature?
This is the most glaringly missing feature. And it should be assignable to F9, where everyone else puts it.
This feature exists in SSMSBoost add-in: Shift+F5 (Select current statement) + F5 (Run selected)
This is a great idea! Please add!!
Morgan Schwertfeger commented
I've seen SO posts complaining about this feature lacking as far back as 2011. Its amazing its still on the planned list. Are we expected to use redgate?
iqbal muhammad commented
2. find Tools.ExecuteStatement, change its shortcut to Global.
afroz ahmed commented
This should definitely be in SSMS.
But If you are interested in trying a new tool, SQL Ops Studio has this feature.
The actual Redgate SQL Prompt command is Shift + F5, not Ctrl + F5 (at least in version 9 anyway).
This is a great idea. Powershell has F5 execute the whole script and F8 execute current line/statement.
Steve Malcolm commented
This is a great idea. Looking forward to seeing it in a future version.
Dan Wallace commented
Wow, that sql prompt tip will save me a huge amount of keystrokes. Thanks for that one. Agree it should be in SSMS.
Christian Møller commented
But what if you don't have Red-Gate Prompt tool. Then this should be a part of SSMS
The Redgate SQL Prompt will give you this functionality in SSMS. With Ctrl F5 it'll run the SQL command the cursor is on. Must say I probably couldn't live without it now.