Skip to content
Cheat sheet · SSMS

SSMS Keyboard Shortcuts Cheat Sheet

A printable cheat sheet of about 70 SSMS keyboard shortcuts, grouped by what you are doing: running queries and plans, handling results, editing T-SQL, IntelliSense, search, windows and bookmarks. Every key combination is taken from Microsoft's SSMS keyboard shortcuts reference for the default scheme, and the last section shows how to add your own query shortcuts.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: SSMS 22.10.2, default keyboard scheme. Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • The five to learn first: F5 runs the query (or the selection), Alt+Break cancels it, Ctrl+L shows the estimated plan, Ctrl+M includes the actual plan, Ctrl+R hides or shows the results pane.
  • Comment and uncomment with the chords Ctrl+K, Ctrl+C and Ctrl+K, Ctrl+U; refresh IntelliSense after schema changes with Ctrl+Shift+R.
  • Ctrl+Shift+C copies the results grid with headers; Ctrl+D, Ctrl+T and Ctrl+Shift+F switch output to grid, text or file.
  • SSMS is Windows only, so there are no macOS key bindings; shortcuts follow the Visual Studio-based default scheme and can be changed in Tools > Options.
How we know: Research-based: every shortcut below is copied from Microsoft's "SQL Server Management Studio keyboard shortcuts" page, with the results shortcuts cross-checked against "Query results in SQL Server Management Studio" and custom shortcuts against "Options (Environment - Keyboard page)", all on Microsoft Learn on 8 October 2026. A comma between two key combinations (for example Ctrl+K, Ctrl+C) means press them one after the other. If you changed the keyboard scheme or installed other components, some keys can differ.

SSMS shortcuts for running queries and execution plans

Query execution shortcuts (Windows)
ActionShortcut
Run the selection, or the whole query window if nothing is selectedF5
Parse (check syntax) without runningCtrl+F5
Cancel the executing queryAlt+Break
Display the estimated execution planCtrl+L
Include the actual execution plan in the outputCtrl+M
Open a new query with the current connectionCtrl+N
Specify values for template parametersCtrl+Shift+M
Display the Query Designer from the query editorCtrl+Shift+Q
Run the sp_help system stored procedureAlt+F1
Run sp_whoCtrl+1
Run sp_lockCtrl+2

Results pane shortcuts

The output destination applies to the current query window from the next execution, so press the shortcut and then F5.

Results shortcuts (Windows)
ActionShortcut
Output results in a gridCtrl+D
Output results as textCtrl+T
Output results to a fileCtrl+Shift+F
Show or hide the results paneCtrl+R
Toggle between the query and results panesF6
Copy the result grid and headers to the clipboardCtrl+Shift+C

Editing T-SQL

Code editor shortcuts (Windows)
ActionShortcut
Comment the selected textCtrl+K, Ctrl+C
Uncomment the selected textCtrl+K, Ctrl+U
Make the selection uppercaseCtrl+Shift+U
Make the selection lowercaseCtrl+Shift+L
Increase indentTab
Decrease indentShift+Tab
Go to lineCtrl+G
UndoCtrl+Z
RedoCtrl+Y or Ctrl+Shift+Z
Insert a blank line above the cursorCtrl+Enter
Insert a blank line below the cursorCtrl+Shift+Enter
Move the current line below the next lineShift+Alt+T
Delete the word to the right / left of the cursorCtrl+Delete / Ctrl+Backspace
Delete whitespace in the selection or next to the cursorCtrl+K, Ctrl+\
SaveCtrl+S
Save allCtrl+Shift+S
Toggle outlining for the current blockCtrl+M, Ctrl+M
Toggle all outliningCtrl+M, Ctrl+L

Selecting text and column (box) selection

Selection shortcuts (Windows)
ActionShortcut
Select the whole documentCtrl+A
Select the word at the cursorCtrl+W
Select to the start / end of the lineShift+Home / Shift+End
Select to the start / end of the documentCtrl+Shift+Home / Ctrl+Shift+End
Extend a column (box) selection up or downShift+Alt+Up Arrow / Shift+Alt+Down Arrow
Extend a column selection left or rightShift+Alt+Left Arrow / Shift+Alt+Right Arrow
Navigate backward / forward in the editor historyCtrl+- / Ctrl+Shift+-
IntelliSense and search shortcuts (Windows)
ActionShortcut
List members (show completion list)Ctrl+J
Refresh the IntelliSense local cacheCtrl+Shift+R
Enable or disable IntelliSenseCtrl+B, Ctrl+I
Insert a code snippetCtrl+K, Ctrl+X
Surround with a snippetCtrl+K, Ctrl+S
Code Snippet ManagerCtrl+K, Ctrl+B
FindCtrl+F
ReplaceCtrl+H
Replace in filesCtrl+Shift+H
Find next / previousF3 / Shift+F3

Windows, tools and bookmarks

Window and tool shortcuts (Windows)
ActionShortcut
Object ExplorerF8
Object Explorer DetailsF7
Registered ServersCtrl+Alt+G
Template ExplorerCtrl+Alt+T
Solution ExplorerCtrl+Alt+L
Properties windowF4
Copilot in SSMSCtrl+Alt+C
Activity MonitorCtrl+Alt+A
SQL Server ProfilerCtrl+Alt+P
Cycle through open windowsCtrl+Tab / Ctrl+Shift+Tab
Close the current document windowCtrl+F4
Toggle full screenShift+Alt+Enter
Set or remove a bookmark on the current lineCtrl+K, Ctrl+K
Next / previous bookmarkCtrl+K, Ctrl+N / Ctrl+K, Ctrl+P
Clear bookmarksCtrl+K, Ctrl+L
Bookmarks windowCtrl+K, Ctrl+W
Help for the current windowF1

Change keys and add your own query shortcuts

SSMS uses a keyboard scheme based on Visual Studio by default. To change the scheme, open Tools > Options and select Environment > Keyboard.

Alt+F1, Ctrl+1 and Ctrl+2 run system stored procedures. You can map other keys to stored procedures as query shortcuts: to add your own, open Tools > Options > Keyboard > Query Shortcuts, choose an unused combination in the Shortcut list, type the procedure name (for example sp_helpindex) in Stored Procedure, and select OK. SSMS 22.6.0 moved these settings to the new Unified Settings experience, and 22.8.0 fixed a bug that disabled this menu, so keep SSMS up to date if the page looks different.

Coming from Azure Data Studio or working on a Mac? The MSSQL extension for VS Code has its own key bindings; see SSMS for Mac: what to use instead in the related guides.

Frequently asked questions

What is the shortcut to execute a query in SSMS?

F5. It runs the selected text, or the whole query window if nothing is selected. Ctrl+F5 only parses the batch without running it.

How do I comment out multiple lines in SSMS?

Select the lines and press Ctrl+K, then Ctrl+C. To uncomment, press Ctrl+K, then Ctrl+U.

How do I show the execution plan with a shortcut?

Ctrl+L shows the estimated plan without running the query. Ctrl+M toggles including the actual plan, which appears after you run the query with F5.

How do I refresh IntelliSense after creating a table?

Press Ctrl+Shift+R to refresh the IntelliSense local cache, so new tables and columns appear in the completion list.

Are there SSMS shortcuts for Mac?

No. SSMS runs only on Windows. On macOS, VS Code with the MSSQL extension is Microsoft's supported tool, with its own shortcuts.

Sources

Checked 8 October 2026.

How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.

Still choosing a SQL client?

Read the full reviews, or compare tools side by side.