Simple Talk is now part of the Redgate Community hub - find out why

SSMS: The Query Window Keyboard Shortcuts

Simple-Talk's free wallchart of the most important SSMS keyboard shortcuts aims to help find all those curiously forgettable key combinations within SQL Server Management Studio that unlock the hidden magic that is available for editing and executing queries.

The Keyboard shortcuts that are displayed in the wall-chart are based on what is on Books-on-line, but reordered and grouped in such a way as to make it easier to find what you’re looking for. We’ve also taken out a lot of the keystrokes for navigating rapidly between various parts of SSMS that aren’t related to the query windows, since this was intended more for the SQL developer. We added the SQL Prompt keys since SQL Prompt is so widely used.

The Wallchart is available at the bottom of the article as a PDF.

SSMS

…Toggle the full-screen display

Shift+Alt+Enter

… Navigate to

Cntl+,

…Exit

Alt+F4

Query Window

…Open with current connection

Ctrl+Q

…Open with new connection

Ctrl+N

…Save current

Ctrl+S

…Save All

Ctrl+Shift+S

…Close

Ctrl+F4

…Print

Ctrl+P

…Show or hide the results pane

Ctrl+R

…Toggle query & results pane

F6

Cycle Clipboard Ring

Ctrl+shift+V

…Move to previous active window

Ctrl+Shift+F6

…Move to the next active window

Ctrl+F6

…trace query in SQL Server Profiler

Ctrl+Alt+P

…Open Object Explorer if closed

F8

…Open Server in Object Explorer

Alt+F8

…Design Query in Editor

Ctrl+Shift+Q

…Display Go To Line dialog box

Ctrl+G

View

…Object Explorer

F8

…Object Explorer Details

F7

…Registered Servers

Ctrl+Alt+G

…Template Explorer

Ctrl+Alt+T

…Solution Explorer

Ctrl+Alt+L

…Bookmark Window

Ctrl+K, Ctri+W

…Error List

Ctrl+V Ctri+E

..Output

CtrkAlt+O

…Task List

Ctrl+Alt+K

…Toolbox

Ctrl+Alt+X

…Full Screen

Shift+Alt+Enter

…Navigate Backward

Ctrl-

…Navigate Forward

Ctrl+Shift+-

…Properties Window

F4

line indent

…Increase

TAB

…Decrease

Shift+TAB

Make selected text

…upper case

Ctrl+Shift+U

…lower case

Ctrl+Shift+L

…a comment

Ctrl+K, Ctrl+C

…Uncommented

Ctrl+K, Ctrl+U

Specify values

…for template parameters

Ctrl+Shift+M

Current Query, selected or all

…Execute

F5 (or Ctrl+E)

…Parse

Ctrl+F5

…Display estimated execution plan

Ctrl+L

…Include Client Statistics

Shift+Alt+S

…Include Actual Execution Plan

Ctrl+M

…Cancel the executing query

Alt+Break

Debugging

…Start

 Alt+F5

…Stop

 Shift+F5

..Step Into

 F11

…Step Over

 F10

…Toggle Breakpoint

 F9

…Delete All Breakpoints

Ctrl+Shift+F9

Output results

…in a grid

Ctrl+D

…in text format

Ctrl+T

…to a file

Ctrl+Shift+F

Scroll text

… up one line

Ctrl* Up-arrow

… below the cursor

Ctrl+Shift+Enter

Delete

…all text in the window

Ctrl+Shift+DEL

…the word to the right of the cursor

Ctrl+Delete

…the word to the left of the cursor

Ctrl+BACKSPACE

Move the cursor

…to the beginning of the line

Home

…to the end of the line

End

…the beginning of the document

Ctrl* Home

…to the end of the document

Ctrl+End

…Move the cursor up one screen

Page Up

…Move the cursor down one screen

Page Down

…one word to the right

Ctrl+Right-arrow

…one word to the left

Ctrl+Left-arrow

Select text from the cursor

…to the beginning of the document

Ctrl+Shift+Home

… to the end of the document

Ctrl+Shift+End

…to the start of the current line

Shift+Home

…down line by line

Shift+Down -arrow

… up line by line

Shift+Up-arrow

Select

… the entire current document

Ctrl+A

… the word containing the cursor, or the closest word

Ctrl+W

… the current location in the editor, back to the previous location in the editor

Ctrl+=

Extend selection

…to the top of the current window

Ctrl+Shift+Page Up

… one word to the right

Ctrl+Shift+Right-arrow

… one word to the left

Ctrl+Shift+Left-arrow

… one page up

Shift+Page Up

… one page down

Shift+Page-Down

Move the cursor, Extending the selection

…To the right one word,

Ctrl+Shift+Alt+Right-arrow

… to the left one word.

Ctrl+Shift+Alt+Left-arrow

… to the last line in view.

Ctrl+Shift+Page Down

… up one line

Shift+AIt+Up -arrow

…down one line

Shift+Alt+Down-arrow

…Block (column-wise) left

Alt+Shift +Left-arrow

…Block right

Alt+Shift +Right-arrow

…Block up

Alt +Shift +Up-arrow

…Block down

Alt+Shift +Down-arrow

Search for text

…Display the Find dialog box

Ctrl+F

…Display the Replace dialog box

Ctrl+H

… the next occurrence of the previous search text

F3

… the previous occurrence of the search text

Shift+F3

…the next occurrence of the currently selected text

Ctrl+F3

… the previous occurrence of the currently selected text

Ctrl+Shift+F3

(SQL Prompt) Format

…Rename variables/aliases

F2

… Format SQL

Ctrl+K, Ctrl+Y

… Uppercase keywords

Ctrl+B, Ctrl+U

… Expand wildcards

Ctrl+B, Ctrl+W

… Qualify object names

Ctrl+B, Ctrl+Q

… Add/remove square brackets

Ctrl+B, Ctrl+B

… Insert semicolons

Ctrl+B, Ctrl+C

… Encapsulate as new stored procedure

Ctrl+B, Ctrl+E

(SQL Prompt) Navigate

… Script object as ALTER

F12

… Execute current statement

Shift+F5

… Code Snippets Manager

Ctrl+K,Ctrl+B

… Select in Object Explorer

Ctrl+F12

… Tab history

Ctrl+Q

… Summarize script

Ctrl+B, Ctrl+S

… Find unused variables and parameters

Ctrl+B, Ctrl+F

(SQL Prompt) Code-Complete

… Show suggestions

Ctrl+Space

… Refresh suggestions

Ctrl+Shift+D

… Code suggestions on/off

Ctrl+Shift+P

… Switch to/from column picker

Ctrl+Left / Ctrl+Right

… Move up/down suggestions box filters

Ctrl+Up / Ctrl+Down

Intellisense

…List members

Ctrl+Space or Ctrl+J

…Complete word

Alt+Right Arrow

… Parameter Information

Ctrl+Shift+Space

… Refresh Local Cache

Ctrl+Shift+R

… Jump between syntax pairs

CTRL+]

Bookmark

…go to Next one

Ctrl+K, Ctrl+N,

…go to previous one

Ctrl+K, Ctrl+P

…Toggle (set or remove)

Ctrl+K, Ctrl+K

… Clear Bookmarks

Ctrl+K, Ctrl+H

How you log in to Simple Talk has changed

We now use Redgate ID (RGID). If you already have an RGID, we’ll try to match it to your account. If not, we’ll create one for you and connect it.

This won’t sign you up to anything or add you to any mailing lists. You can see our full privacy policy here.

Continue

Simple Talk now uses Redgate ID

If you already have a Redgate ID (RGID), sign in using your existing RGID credentials. If not, you can create one on the next screen.

This won’t sign you up to anything or add you to any mailing lists. You can see our full privacy policy here.

Continue