SQL Keyboard Shortcuts: Complete Command Reference

SQL (Structured Query Language) efficiency depends on the rapid execution and manipulation of queries within Integrated Development Environments (IDEs). Utilizing SQL keyboard shortcuts minimizes reliance on graphical user interface (GUI) menus and accelerates database management tasks. Whether working in SQL Server Management Studio (SSMS), PostgreSQL (pgAdmin), or MySQL Workbench, these default keybindings streamline the development workflow and improve technical productivity.

This reference details essential SQL shortcuts for 2026, categorized by functional domain. The data focuses on universal commands and platform-specific triggers for the most widely used database management systems.

Query Execution and Management

Execution shortcuts are the primary tools for running scripts and managing active query windows.

ActionSSMS (SQL Server)pgAdmin (Postgres)MySQL Workbench
Execute Current QueryF5 / Ctrl + EF5 / Alt + Shift + ECtrl + Shift + Enter
Execute SelectionF5 / Ctrl + EF5Ctrl + Enter
Cancel Executing QueryAlt + BreakQ(Via Toolbar)
New Query TabCtrl + NAlt + Shift + QCtrl + T
Close Current TabCtrl + F4 / Ctrl + WCtrl + WCtrl + W
Save ScriptCtrl + SCtrl + SCtrl + S

Code Editing and Formatting

Technical editing shortcuts allow for rapid modification of SQL statements and ensure code readability.

ActionShortcut Key (Universal/SSMS)
Comment SelectionCtrl + K, Ctrl + C
Uncomment SelectionCtrl + K, Ctrl + U
Convert to UppercaseCtrl + Shift + U
Convert to LowercaseCtrl + Shift + L
Display IntelliSense / AutocompleteCtrl + Space
Indent / Outdent BlockTab / Shift + Tab
Toggle BookmarksCtrl + K, Ctrl + K
Go to Matching BraceCtrl + ]

Navigation and View Controls

Navigating large schemas and managing result sets requires specific navigation shortcuts to maintain focus on the dataset.

ActionKeyboard Shortcut
Show/Hide Results PaneCtrl + R
Toggle Full ScreenShift + Alt + Enter
Focus Object ExplorerF8
Search (Find)Ctrl + F
Find and ReplaceCtrl + H
Go to Line NumberCtrl + G
Clear Query WindowCtrl + Shift + Del

Result Set and Data Grid Shortcuts

Manipulating the data returned from a SELECT statement is essential for data analysis and export tasks.

ActionShortcut Key
Select All ResultsCtrl + A
Copy with HeadersCtrl + Shift + C
Save Results As (CSV/Text)Ctrl + Shift + S (In some IDEs)
Switch to Grid ViewCtrl + D
Switch to Text ViewCtrl + T

Technical Tip: The “Execute Selection” Workflow

Database administrators frequently use the F5 or Ctrl + E shortcut to run only a specific portion of a large script. Highlighting a block of code and pressing the execution key limits the query engine’s scope to the selection, preventing the accidental execution of destructive commands (like DROP or DELETE) elsewhere in the file.

Customizing SQL Hotkeys

Most professional SQL environments allow for the remapping of these default controls. In SSMS, navigate to Tools > Options > Environment > Keyboard. In pgAdmin, use File > Runtime > Preferences > Keyboard Shortcuts. Customizing these bindings ensures that the development environment aligns with specific project requirements and personal speed-coding habits.