You are on page 1of 1

SSMS: The Query Window Keyboard Shortcuts.

This wall-chart gives, on a single page, all the more useful keyboard shortcuts that make the editing of SQL queries
quicker and easier. This is intended to help ordinary mortals who find the assignment of the keystrokes unintuitive
and difficult to remember. Sometimes there is no GUI equivalent, as with the block selection of text or toggling the
visibility of the results pane. The latest version of this wall-chart will be held on Simple-Talk at http://bit.ly/l7xGjx

SSMS …Toggle the full-screen display Shift+Alt+Enter …down line by line Shift+Down-arrow
…Exit Alt+F4 … up line by line Shift+Up-arrow
Query Window Open with current connection Ctrl+Q Select … the entire current document Ctrl+A
…Save current Ctrl+S … the word containing the cursor, or Ctrl+W
the closest word
…Save All Ctrl+Shift+S
… the current location in the editor, Ctrl+=
…Close Ctrl+F4
back to the previous location in the
…Print Ctrl+P editor

…Show or hide the results pane Ctrl+R Extend selection …to the top of the current window Ctrl+Shift+Page Up

…Toggle query & results pane F6 … one word to the right Ctrl+Shift+Right-arrow

…Move to previous active window Ctrl+Shift+F6 … one word to the left Ctrl+Shift+Left-arrow

…Move to the next active window Ctrl+F6 … one page up Shift+Page Up

…Open SQL Server Profiler Ctrl+Alt+P … one page down Shift+Page Down

…Open Object Explorer if closed F8 Move the cursor, …To the right one word, Ctrl+Shift+Alt+Right-
extending the arrow
…Display Go To Line dialog box Ctrl+G selection
line indent …Increase TAB … to the left one word, Ctrl+Shift+Alt+Left-
arrow
…Decrease Shift+TAB
… to the last line in view, Ctrl+Shift+Page Down
Make selected text …upper case Ctrl+Shift+U
… up one line Shift+Alt+Up-arrow
…lower case Ctrl+Shift+L
…down one line Shift+Alt+Down-arrow
…a comment Ctrl+K, Ctrl+C
…Uncommented Ctrl+K, Ctrl + U …Block (column-wise) left Alt+Shift +Left-arrow
…Block right Alt+Shift +Right-arrow
Specify values …for template parameters Ctrl+Shift+M
…Block up Alt +Shift +Up-arrow
Current Query, …Execute F5 (or Ctrl+E)
selected or all …Block down Alt+Shift +Down-arrow
…Parse Ctrl+F5 Search for text …Display the Find dialog box Ctrl+F
…Display estimated execution plan Ctrl+L …Display the Replace dialog box Ctrl+H
…Cancel the executing query Alt+Break … the next occurrence of the F3
…in a grid Ctrl+D previous search text
Output results
…in text format Ctrl+T … the previous occurrence of the Shift+F3
search text
…to a file Ctrl+Shift+F
…the next occurrence of the Ctrl+F3
Scroll text … up one line Ctrl+Up-arrow currently selected text

… down one line Ctrl+Down-arrow … the previous occurrence of the Ctrl+Shift+F3


currently selected text
Undo … the last editing action Ctrl+Z
SQL Prompt …Show suggestions box Ctrl + Space
Redo … the last undone edit Ctrl+Y
…Switch to/from column picker Ctrl + F, Ctrl + G
Insert a blank line …above the cursor Ctrl+Enter

… below the cursor Ctrl+Shift+Enter …Move up/down the suggestions Ctrl + H, Ctrl + I
box filters
Delete …all text in the window Ctrl+Shift+DEL
…Apply format Ctrl + K, Y
…the word to the right of the cursor Ctrl+Delete
…Script object as ALTER F12
…the word to the left of the cursor Ctrl+BACKSPACE

Move the cursor …to the beginning of the line Home …Refresh Suggestions Ctrl + Shift + D

…to the end of the line End Intellisense …List members Ctrl +Space or Ctrl+J

…the beginning of the document Ctrl+Home …Complete word Alt + Right Arrow
…to the end of the document Ctrl+End … Parameter Information Ctrl + Shift + Space
…Move the cursor up one screen Page Up … Refresh Local Cache Ctrl + Shift + R
…Move the cursor down one screen Page Down … Jump between syntax pairs CTRL+]
…one word to the right Ctrl+Right-arrow Bookmark …go to Next one Ctrl+K, Ctrl+N,
…one word to the left Ctrl+Left-arrow …go to previous one Ctrl+K, Ctrl+P
Select text from …to the beginning of the document Ctrl+Shift+Home …Toggle (set or remove) Ctrl+K, Ctrl+K
the cursor
… Clear Bookmarks Ctrl+K, Ctrl+H
… to the end of the document Ctrl+Shift+End

…to the start of the current line Shift+Home

…to the end of the current line Shift+End

All Rights reserved Simple-Talk Publications

You might also like