Shortcuts & Configuration Reference Guide
How much time are you losing to your mouse?
Writing SQL isn’t just about knowing the syntax; it’s about the flow. If you’re constantly clicking through menus, you’re breaking your mental model of the data. Here is my ultimate SSMS Shortcut Cheat Sheet: Everything you need to know.
Code Editor
| Action | Shortcut |
|---|---|
| Toggle the full-screen display | SHIFT + ALT + ENTER |
| Scroll text up one line | CTRL + UP ARROW |
| Scroll text down one line | CTRL + DOWN ARROW |
| Reverse the last editing action | CTRL + Z |
| Restore the previously undone edit | CTRL + Y / ALT + SHIFT + BACKSPACE |
| Save the selected item | CTRL + S |
| Save all | CTRL + SHIFT + S |
| Close | CTRL + F4 |
| CTRL + P | |
| Exit | ALT + F4 |
| Delete all text in the current file | CTRL + SHIFT + DEL |
| Display the “Go To Line” dialog box | CTRL + G |
| Increase line indent | TAB |
| Decrease line indent | SHIFT + TAB |
| Make the selected text upper case | CTRL + SHIFT + U |
| Make the selected text lower case | CTRL + SHIFT + L |
| Make the selected text a comment | CTRL + K, CTRL + C |
| Uncomment the selected text | CTRL + K, CTRL + U |
| Open a new query with current connection | CTRL + N |
| Open server in Object Explorer | ALT + F8 |
| Specify values for template parameters | CTRL + SHIFT + M |
| Execute the selected portion of the query editor or everything | F5 or CTRL + E or ALT + X |
| Parse the selected portion of the query editor or everything | CTRL + F5 |
| Display the estimated execution plan | CTRL + L |
| Cancel the executing query | ALT + BREAK |
| Output results in a grid | CTRL + D |
| Output results in text format | CTRL + T |
| Output results to a file | CTRL + SHIFT + F |
| Toggle between query and result pane | CTRL + R |
| Auto hide all | F6 |
| Windows | ALT + ENTER |
| Move to the next active window in Management Studio | CTRL + W |
| Include actual execution plan in the query output | CTRL + F6 |
| Zoom in/out text in query editor | CTRL + MOUSE SCROLL WHEEL |
| Column mode edit in query editor | ALT + DRAG MOUSE |
| Insert code snippet | CTRL + K, CTRL + X |
| Surround code with snippet | CTRL + K, CTRL + S |
| Open a new query with current connection and using template | Drag template into Query Editor or Double Click on template |
| Find text | CTRL + F |
| Find next | F3 |
| Find previous | SHIFT + F3 |
| Incremental search | CTRL + I |
| Back search | CTRL + SHIFT + I |
| Find and replace | CTRL + H |
Menu Activation
| Action | Shortcut |
|---|---|
| Move the SQL Server Management Studio menu bar | ALT |
| Activate the menu for a tool component | ALT + - |
| Display the context menu | SHIFT + F10 |
| Display the New Project dialog box to create a new project | CTRL + SHIFT + N |
| Display the Open File dialog box to open an existing file | CTRL + O |
| Display the Open Project dialog box to open an existing project | CTRL + SHIFT + O |
| Display the Add New Item dialog box to add new file to the current project | CTRL + SHIFT + A |
| Display the Add Existing Item dialog box to add an existing file to the current project | ALT + SHIFT + A |
| Display the Query Designer | CTRL + SHIFT + Q |
| Close a menu or dialog box, canceling the action | ESC |
Cursor Movement
| Action | Shortcut |
|---|---|
| Move the cursor left, right, up, down | Left / Right / Up / Down Arrow |
| Move the cursor to the beginning of the line | HOME |
| Move the cursor to the end of the line | END |
| Move the cursor to the beginning of the document | CTRL + HOME |
| Move the cursor to the end of the document | CTRL + END |
| Move the cursor up one screen | PAGE UP |
| Move the cursor down one screen | PAGE DOWN |
| Moves the cursor one word to the right | CTRL + RIGHT ARROW |
| Moves the cursor one word to the left | CTRL + LEFT ARROW |
Windows Management & Toolbars
| Action | Shortcut |
|---|---|
| Close the current MDI child window | CTRL + F4 |
| CTRL + P | |
| Exit | ALT + F4 |
| Toggle full screen mode | SHIFT + ALT + ENTER |
| Close the current tool window | SHIFT + ESC |
| Cycle through the next MDI child windows | CTRL + TAB |
| Cycle through the previous MDI child windows | CTRL + SHIFT + TAB |
| Move to the current tool window toolbar | SHIFT + ALT |
| Move to the next tool window | ALT + F6 |
| Move to the previously selected window | SHIFT + ALT + F6 |
| Display Object Explorer | F8 |
| Display Registered Servers | CTRL + ALT + G |
| Display Template Explorer | CTRL + ALT + T |
| Display Solution Explorer | CTRL + ALT + L |
| Display Object Explorer Details | F7 |
| Display the Properties Window | F4 |
| Display the Toolbox | CTRL + ALT + X |
| Display the Bookmarks Window | CTRL + K, CTRL + W |
| Display the Browser Window | CTRL + ALT + R |
Text Selection
| Action | Shortcut |
|---|---|
| Select text from the cursor to the beginning of the document | CTRL + SHIFT + HOME |
| Select text from the cursor to the end of the document | CTRL + SHIFT + END |
| Select text from the cursor to the start of the current line | SHIFT + HOME |
| Select text from the cursor to the end of the current line | SHIFT + END |
| Select text down line by line starting from the cursor | SHIFT + DOWN ARROW |
| Select text from the cursor to the end of the document | SHIFT + ALT + END |
| Select text up line by line starting from the cursor | SHIFT + UP ARROW |
| Move the cursor up one line, extending the selection | SHIFT + ALT + UP ARROW |
| Extend selection up one page | SHIFT + PAGE UP |
| Extend selection down one page | SHIFT + PAGE DOWN |
| Select the entire current document | CTRL + A |
| Select the word containing the cursor, or the closest word | CTRL + W |
| Select the current location in the editor, back to the previous location in the editor | CTRL + = |
| Extend the selection to the top of the current window | CTRL + SHIFT + PAGE UP |
| Move the cursor to the last line in view, extending the selection | CTRL + SHIFT + PAGE DOWN |
| Extend the selection one word to the right | CTRL + SHIFT + RIGHT ARROW |
| Extend the selection one word to the left | CTRL + SHIFT + LEFT ARROW |
| Move the cursor to the right one word, extending the selection | CTRL + SHIFT + ALT + RIGHT ARROW |
| Move the cursor to the left one word, extending the selection | CTRL + SHIFT + ALT + LEFT ARROW |
| Column mode selection in query editor | ALT + DRAG MOUSE |
Text Manipulation
| Action | Shortcut |
|---|---|
| Insert a new line | ENTER or SHIFT + ENTER |
| Swap the characters on either side of the cursor | CTRL + T |
| Delete one character to the right of the cursor | DELETE |
| Delete one character to the left of the cursor | SHIFT + BACKSPACE |
| Insert the number of spaces configured for the editor | TAB |
| Insert a blank line above the cursor | CTRL + ENTER |
| Insert a blank line below the cursor | CTRL + SHIFT + ENTER |
| Change the selected text to lowercase | CTRL + SHIFT + L |
| Change the selected text to uppercase | CTRL + SHIFT + U |
| Toggle between insertion mode and overtype mode | INSERT |
| Move selected lines to the left on tab stop | SHIFT + TAB |
| Delete the word to the right of the cursor | CTRL + DELETE |
| Delete the word to the left of the cursor | CTRL + BACKSPACE |
| Transpose the words on either side of the cursor | CTRL + SHIFT + T |
Management Studio Configuration
| Action | Configuration Steps |
|---|---|
| Hide status bar | From the Tools menu > Options > Environment > General and click on the checkbox “Show status bar” |
| Setup query shortcuts |
From the Tools menu > Options > Environment > Keyboard > Query Shortcuts. Custom setup example: Ctrl+F1 = sp_columnsCtrl+3 = sp_helptextCtrl+4 = sp_spaceusedCtrl+5 = sp_helptriggerCtrl+6 = sp_helpindex
|
| Add line numbers to your query editor | From the Tools menu > Options > Text Editor > All Languages and click on checkbox “Line numbers” under Display. |
| Display information on query tabs and status bar |
From the Tools menu > Options > Text Editor > Editor Tab and Status Bar. Options include: Colorize status bar, display database/server/login/file name, display execution time. |
| Open new query windows in SQLCMD mode by default | From the Tools menu > Options > Query Execution and click on checkbox “By default, open new queries in SQLCMD mode” |
| Avoid missing data by increasing number of characters displayed in each column | From the Tools menu > Options > Query Results > SQL Server > Results to Text and change the value for “Maximum number of characters displayed in each column” to 8192. |
| Change the number of rows returned when right clicking on a table or view in Object Explorer | From the Tools menu > Options > SQL Server Object Explorer > Commands and change the value under “Table and View Options” to your desired amount. |
| Create a template folder | Available via the Template Explorer options menu. |