How to Execute Query Without Using F5 or Query Toolbar in SSMS? – Interview Question of the Week #224

Question: Can you execute an SSMS query without F5 or the Execute toolbar button? Yes. The Query menu and the editor’s context menu offer Execute, and older SSMS versions also exposed the command through the toolbar’s Find/Command box.

Two railway routes meet at the same tunnel with a switch at their junction

During private training, an attendee asked for a less familiar way to run a query. We already knew F5, the Execute button, Query > Execute, and right-clicking a selected query to choose Execute. The question was whether SSMS had another route.

Here is the little trick I showed in the 2019 article. With the query window active, use the toolbar Find/Command box and enter >Query.Execute, including the greater-than sign, then press Enter.

Original SSMS screen points to the command box containing greater-than Query.Execute
The original older-SSMS capture shows the command box and its exact text. This is not the Tools > Options dialog.

The screenshot matters here because it shows which box I meant. Toolbar search and command surfaces have changed across SSMS versions. If your version doesn’t offer this route, use Query > Execute or inspect the Query.Execute command’s keyboard binding in Tools > Options > Environment > Keyboard.

This doesn’t make anyone a better DBA. I simply enjoy finding a small feature I hadn’t noticed. Do you have an SSMS trick that made you say, “How long has that been there?”

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Server, SQL Server Management Studio, SQL Shortcut
Previous Post
Dirty Pages – How to List Dirty Pages From Memory in SQL Server? – Interview Question of the Week #223
Next Post
When Was SQL Server Last Restarted? – Interview Question of the Week #225

Related Posts

4 Comments. Leave new

  • Select the query and type CTRL + E is another option to execute query.

    Reply
  • You can also press Alt + X to execute a query, is works the same as F5

    Reply
  • Cory Buczkowski
    May 12, 2019 5:41 pm

    Hey Dave, love your stuff. You can also right click on a stored procedure in the object explorer window of management studio and choose to execute it.

    Reply
  • edhurtado@yahoo.com
    May 12, 2019 11:07 pm

    Great stuff. How about Ctrl + E…just this one all the time. I like the Alt + X, JD.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.