How can I run just the statement my cursor is on in SQL Server Management Studio?

后端 未结 24 656
夕颜
夕颜 2020-12-04 17:19

As a long time Toad for Oracle user, I have gotten used to hitting Ctrl+Enter and having just the statement under the cursor be executed.

In SQL Server Management St

24条回答
  •  遥遥无期
    2020-12-04 17:40

    If the executor add-on solution (in the top posted answer) isn't working properly, i got it to work for me (SSMS v17.8.1): The add-on adds a command under tools: Tools > Execute Inner Statement.

    You can assign a custom keyboard shortcut key to it by going to Tools > Options > Keyboard then search for "execute" in the 'Show commands containing:' and selecting Tools.ExecuteInnerStatement. Then just assign your desired keystroke(s) in the 'Press shortcut keys:' field and hit the Assign button.

提交回复
热议问题