SQL Query Analyzer Shortcuts

Problem

Using Query Analyzer is a great tool for testing queries, running ad hoc queries, troubleshooting queries etc… There is a lot of functionality as well as a lot of shortcuts built into the tool, but finding the shortcuts or remembering them is sometimes not that easy.

Solution

Following are two tables of the shortcuts that you can use in Query Analyzer.  The first chart is listed in Shortcut order and the second is listed in Function order.  Once you are familiar with the shortcuts, they can save a lot of time and mouse clicks.

ShortcutFunction ShortcutFunction
ALT+BREAKCancel a query CTRL+SHIFT+F2Clear all bookmarks
ALT+F1Database object information CTRL+SHIFT+INSERTInsert a template
ALT+F4Exit CTRL+SHIFT+LMake selection lowercase
CTRL+ASelect all CTRL+SHIFT+MReplace template parameters
CTRL+BMove the splitter CTRL+SHIFT+POpen
CTRL+CCopy CTRL+SHIFT+RRemove comment
CTRL+DDisplay results in grid format CTRL+SHIFT+SShow client statistics
CTRL+DeleteDelete through the end of the line CTRL+SHIFT+TShow server trace
CTRL+EExecute query CTRL+SHIFT+UMake selection uppercase
CTRL+FFind CTRL+TDisplay results in text format
CTRL+F2Insert/remove bookmark CTRL+UChange database
CTRL+F4Disconnect CTRL+VPaste
CTRL+F5Parse query and check syntax CTRL+WWindow selector
CTRL+GGo to line CTRL+XDelete
CTRL+HReplace CTRL+ZUndo
CTRL+IIndex Tuning Wizard F1Help for Query Analyzer
CTRL+KDisplay/hide execution plan F2Move to next bookmark
CTRL+LDisplay execution plan F3Repeat last search
CTRL+NNew query window F4Object Search
CTRL+OConnect F5Execute a query
CTRL+PPrint F6Switch between query and result panes
CTRL+RShow/Hide results pane F8Show/hide Object Browser
CTRL+SSave SHIFT+F1Transact-SQL help
CTRL+SHIFT+0Show options SHIFT+F2Move to previous bookmark
CTRL+SHIFT+CComment out code SHIFT+TABDecrease indent
CTRL+SHIFT+DELClear the active Editor pane SHIFT+F6Switch panes
CTRL+SHIFT+FSave results to file TABIncrease indent

 

FunctionShortcut FunctionShortcut
Cancel a queryALT+BREAK Make selection uppercaseCTRL+SHIFT+U
Change databaseCTRL+U Move the splitterCTRL+B
Clear all bookmarksCTRL+SHIFT+F2 Move to next bookmarkF2
Clear the active Editor paneCTRL+SHIFT+DEL Move to previous bookmarkSHIFT+F2
Comment out codeCTRL+SHIFT+C New query windowCTRL+N
ConnectCTRL+O Object SearchF4
CopyCTRL+C OpenCTRL+SHIFT+P
Database object informationALT+F1 Parse query and check syntaxCTRL+F5
Decrease indentSHIFT+TAB PasteCTRL+V
DeleteCTRL+X PrintCTRL+P
Delete through the end of the lineCTRL+Delete Remove commentCTRL+SHIFT+R
DisconnectCTRL+F4 Repeat last searchF3
Display execution planCTRL+L ReplaceCTRL+H
Display results in grid formatCTRL+D Replace template parametersCTRL+SHIFT+M
Display results in text formatCTRL+T SaveCTRL+S
Display/hide execution planCTRL+K Save results to fileCTRL+SHIFT+F
Execute a queryF5 Select allCTRL+A
Execute queryCTRL+E Show client statisticsCTRL+SHIFT+S
ExitALT+F4 Show optionsCTRL+SHIFT+0
FindCTRL+F Show server traceCTRL+SHIFT+T
Go to lineCTRL+G Show/hide Object BrowserF8
Help for Query AnalyzerF1 Show/Hide results paneCTRL+R
Increase indentTAB Switch between query and result panesF6
Index Tuning WizardCTRL+I Switch panesSHIFT+F6
Insert a templateCTRL+SHIFT+INSERT Transact-SQL helpSHIFT+F1
Insert/remove bookmarkCTRL+F2 UndoCTRL+Z
Make selection lowercaseCTRL+SHIFT+L Window selectorCTRL+W

 

Next Steps

  • Bookmark this tip for a quick reference to the Query Analyzer shortcuts
  • Get familiar with the shortcuts and take advantage of some the ones you didn’t know existed

Leave a Reply

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