Share via


Keyboard Shortcuts for the Transact-SQL Editor

Most of the keyboard shortcuts for the Transact-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

CTRL+SHIFT+E

Validate SQL Syntax

CTRL+F5

Cancel Executing Query

ALT+BREAK

Results as Grid

CTRL+SHIFT+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+J

Show/Hide Results Pane

CTRL+R

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 can also perform this task by opening the Tools menu, clicking Customize, and then clicking Keyboard in the Customize dialog box.

See Also

Tasks

How to: Start the Transact-SQL Editor

Concepts

Editing Database Scripts and Objects with the Transact-SQL Editor

Other Resources

Shortcut Keys

Editing Code and Resource Files