SQL Shortcuts Cheat Sheet (Windows & Mac)
A printable SQL editor keyboard shortcuts reference for faster query writing and execution.
No shortcuts match your search. Try a different keyword.
Query Editing
| Action | Windows | Mac |
|---|---|---|
| Execute current query | F5 | F5 |
| Run highlighted SQL only | F5 | F5 |
| Comment selected lines | Ctrl + K, Ctrl + C | ⌘ + K, ⌘ + C |
| Remove line comments | Ctrl + K, Ctrl + U | ⌘ + K, ⌘ + U |
| Open a new query tab | Ctrl + N | ⌘ + N |
| Save current script | Ctrl + S | ⌘ + S |
Navigation
| Action | Windows | Mac |
|---|---|---|
| Jump to line number | Ctrl + G | ⌃ + G |
| Find text in editor | Ctrl + F | ⌘ + F |
| Find and replace text | Ctrl + H | ⌃ + H |
| Switch query tabs | Ctrl + Tab | ⌃ + Tab |
| Focus Object Explorer | F8 | F8 |
Selection
| Action | Windows | Mac |
|---|---|---|
| Select entire script | Ctrl + A | ⌘ + A |
| Select word at cursor | Double-click | Double-click |
| Extend selection by character | Shift + Arrow | Shift + Arrow |
| Column block selection | Alt + Drag | ⌥ + Drag |
Formatting
| Action | Windows | Mac |
|---|---|---|
| Indent selected lines | Tab | Tab |
| Reduce line indent | Shift + Tab | Shift + Tab |
| Convert selection to uppercase | Ctrl + Shift + U | ⌘ + Shift + U |
| Convert selection to lowercase | Ctrl + Shift + L | ⌘ + Shift + L |
| Show or hide results pane | Ctrl + R | ⌘ + R |
Execution
| Action | Windows | Mac |
|---|---|---|
| Cancel running query | Alt + Break | Esc |
| Parse without executing | Ctrl + F5 | ⌘ + F5 |
| Include execution plan | Ctrl + L | ⌘ + L |
| Refresh selected object | F5 | F5 |
| Disconnect query session | Ctrl + Alt + Break | ⌃ + ⌥ + Esc |
Download & Print
Free to use. No login required.
Frequently Asked Questions
QWhat are the most useful SQL editor shortcuts?
F5 to execute, Ctrl+F to find, Ctrl+K Ctrl+C to comment, and Ctrl+R to toggle results cover most daily SQL work in SSMS and Azure Data Studio.
QIs there a printable SQL shortcuts cheat sheet?
Yes. Use Download PDF Cheat Sheet or Print Version on this page to save or print the full reference for your desk.
QWhat does F5 do in SQL Server Management Studio?
F5 executes the current query or the selected SQL text. It is the primary shortcut for running scripts against your database connection.
QHow do I learn SQL shortcuts fast?
Start with execute, comment, and find shortcuts during real queries. Add formatting and navigation keys once those feel natural.
QAre SQL shortcuts the same on Mac?
Core actions are similar in Azure Data Studio on Mac, but Ctrl is usually replaced by 鈱? This page lists both Windows and Mac equivalents.