This page lists every keyboard shortcut in the Editor and what each toolbar button does. Use it to look up a key or a button while you write and run a query.
| Action | Shortcut |
|---|---|
| Execute query | Ctrl+Enter |
| Save query | Ctrl+S |
| Add parameter | Ctrl+P |
| Show suggestions | Ctrl+Space |
| SQL intentions (refactor) | Alt+Enter |
| Format SQL (not in the window, but it works) | Ctrl+Shift+F |
Ctrl+Enter runs a selection at once. Without a selection, it highlights the statement at the cursor and opens the Statements list, whose footer reads Enter run · ↑↓ choose · Esc cancel. Any other key, a click in the editor, or leaving the editor also cancels it. For what runs in each case, see Choose what runs.
Alt+Enter opens a list of quick rewrites, such as Expand column list. Enter applies the highlighted rewrite, the arrow keys choose, and Esc cancels. For what the helpers do, see Write and check SQL.
| Action | Shortcut |
|---|---|
| Toggle database explorer | Alt+1 |
| Toggle results panel | Alt+2 |
| Jump editor ↔ results grid | F6 |
| Go to column (in results grid) | Ctrl+F12 |
In the editor, F6 moves focus to the results grid, to the cell you used last or the first cell. In the grid, F6 or Esc returns focus to the editor. These keys do not work while you type in a search or filter box in the grid. Ctrl+F12 in the grid opens a searchable list of the table's columns; choose one to scroll it into view. When a screen shows more than one grid, Ctrl+F12 acts on the grid under your pointer or the grid with focus. For the other grid keys, see The data grid.
| Action | Shortcut |
|---|---|
| Next console | Ctrl+↓ |
| Previous console | Ctrl+↑ |
| New console | Ctrl+Shift+Q |
| Close current console | Alt+X |
| Console history | Ctrl+Shift+H |
Closing a console removes it from the list, but it is kept. See Consoles, saving and history to reopen it.
| Action | Shortcut |
|---|---|
| Comment line | Ctrl+/ |
| Duplicate line | Ctrl+D |
| Move line up | Shift+Alt+↑ |
| Move line down | Shift+Alt+↓ |
| Indent | Tab |
| Outdent | Shift+Tab |
| Undo | Ctrl+Z |
| Redo | Ctrl+Shift+Z or Ctrl+Y |
| Open table in Lake/WH | Ctrl+B |
Ctrl+B opens the Lake or Warehouse popup of the table under the cursor. If there is no table name at the cursor, the Editor shows No table name at cursor. For the popup, see Database Explorer.
| Action | Shortcut |
|---|---|
| Find | Ctrl+F |
| Replace | Ctrl+H |
| Find next | F3 |
| Find previous | Shift+F3 |
| Go to line | Ctrl+G |
| Fold / unfold | Ctrl+K, then Ctrl+L |
| Fold all | Ctrl+K, then 0 |
| Cut current line | Ctrl+X |
| Copy current line | Ctrl+C |
| To uppercase | Ctrl+Shift+U |
| To lowercase | Ctrl+U |
When you move between matches, with Enter or Shift+Enter in the find bar, F3, or the arrow buttons, the line number of the match flashes briefly, so you can see where the jump landed. Typing a new search does not flash the line.
| Action | Shortcut |
|---|---|
| Add cursor at click | Ctrl+Click |
| Multi-edit | Wheel click, or Ctrl+Alt+↑ and Ctrl+Alt+↓ |
( or , inside a function call, the editor shows the parameters the function takes, and it shows them again at every ,.( to read its card.The editor toolbar runs from left to right as follows. Most buttons have no label, so their tooltips name them.
| Button | What it does | Shortcut |
|---|---|---|
| Play button (tooltip Run Query (Ctrl+Enter+Enter)) | Runs the query. It is greyed out while a query runs. | Ctrl+Enter |
| Save (tooltip Save Query (Ctrl+S)) | Records the current text as a version in Console history. It is greyed out when the text matches the saved console text, with the tooltip No changes to save. | Ctrl+S |
| Keyboard button (tooltip Keyboard Shortcuts) | Opens the shortcut window. | None |
| Braces button (tooltip Add Parameter (Ctrl+P)) | Adds a parameter to the query. See Query parameters. | Ctrl+P |
| Format button (tooltip Format SQL (Ctrl+Shift+F)) | Formats the whole query; while it works, its tooltip reads Formatting SQL…. | Ctrl+Shift+F |
| Stop button (tooltip Stop Query) | Stops a running query. It is greyed out when nothing runs. | None |
| Undo button (tooltip Undo (Ctrl+Z)) | Undoes the last edit. | Ctrl+Z |
| Redo button (tooltip Redo (Ctrl+Y)) | Redoes an undone edit. | Ctrl+Y |
| Sparkle button | Turns AI suggestions on or off. Its tooltip reads AI suggestions on - click to disable or AI suggestions off - click to enable. | None |
On the right of the toolbar:
The side bar of the Results Panel holds these buttons. Alt+2 shows or hides the panel.
Ctrl+Enter first highlights the statement, so you can check it. Press Enter, or Ctrl+Enter again, to run it. A selected block runs at once, without this step.
Press F6 in the editor to move to the results grid. Press F6 or Esc in the grid to return to the editor.
Click a cell in the grid, press Ctrl+F12, and type part of the column name. Choose the column to scroll to it.
Yes. Ctrl+Click adds a cursor where you click. Multi-edit also works with a wheel click, or with Ctrl+Alt+↑ and Ctrl+Alt+↓.
No. The shortcuts are fixed, and the Editor has no setting for them.
Yes, for most of them. Inside the editor, Cmd works in place of Ctrl for Execute query, Save query, Add parameter, Format SQL, Open table in Lake/WH, Next console, Previous console, New console and Console history. Alt+X closes the current console on a Mac too.
Save is greyed out when no console is open or when the text in the editor matches the saved console text. Its tooltip then reads No changes to save. The Editor saves your text on its own about a second after you stop typing, so Save is usually greyed out soon after you stop. Each run also records a version when the text has changed. See Consoles, saving and history.
It opens the alert editor with the current query filled in. See Create an alert. You need the Create Alerts permission to see the button. It is greyed out while the console is empty.
With more than one cursor, Escape collapses the cursors into the first one. With a single cursor, it closes the suggestion list and moves focus out of the editor; pressing Space closes an open suggestion list too.
When you jump between matches, the line number of the match flashes briefly, so you can see where the jump landed. Typing a new search does not flash the line.