Keyboard Shortcuts for the Transact-SQL Editor
Most of the keyboard shortcuts for the Transact-SQL (T-SQL) editor are standard throughout Visual Studio, but some shortcuts are specific to the editor.
Additional Keyboard Shortcuts for Transact-SQL
The following keyboard shortcuts are specific to the Transact-SQL Editor.
Menu Option | Keyboard Shortcut |
---|---|
Execute SQL |
F5 CTRL+E |
Validate SQL Syntax |
CTRL+F5 |
Cancel Executing Query |
ALT+Break |
Results as Grid |
CTRL+D |
Results as Text |
CTRL+T |
Results to File |
CTRL+SHIFT+T |
Next Window Pane |
F6 |
Previous Window Pane |
SHIFT+F6 |
Available Databases list |
CTRL+U |
Show/Hide Results Pane |
CTRL+Q |
New Query |
CTRL+N |
Next Window Pane moves focus from the editing pane to the first tab in the results pane, and then the second tab, and so on. If you have multiple results sets in the Results grid, Next Window Pane moves between those results sets before moving to the next tab. Previous Window Pane moves focus through the panes and results sets in the reverse direction.
Note
You can change the keyboard scheme or add keyboard shortcuts by opening the Tools menu, clicking Options, and then clicking Keyboard in the Environment section. You also perform this task by opening the Tools menu, clicking Customize, and then clicking Keyboard in the Customize dialog box.
See Also
Other Resources
Shortcut Keys
Editing Code and Resource Files
Transact-SQL Editing Essentials
Editing Database Scripts and Objects with the Transact-SQL Editor