TablePlus Keyboard Shortcuts
TablePlus blends two genuinely different interaction modes under one roof — a spreadsheet-like grid view for directly browsing and editing table data, and a full SQL query editor for writing and running arbitrary queries — and its shortcut set is correspondingly split between grid-navigation shortcuts borrowed conceptually from spreadsheet software and query-execution shortcuts borrowed from code editor conventions. Its close attention to keyboard-driven data editing (inline cell editing, quick row duplication) reflects its target audience of developers and database administrators who spend hours daily directly inspecting and adjusting live data. TablePlus began as a Mac-first app before its Windows and Linux ports arrived, and a small number of its more advanced query-editor bindings still feel noticeably Mac-native in their key choices even in the newer cross-platform builds. Exporting result sets and reviewing query history both matter for the realistic, iterative way most people actually use a database GUI — pulling a filtered data snapshot out to share with a colleague, or recovering a useful ad hoc query typed earlier in a session without ever having explicitly saved it, are common enough needs that TablePlus builds dedicated support for both rather than expecting every worthwhile query to be manually saved in advance.
Query Editor
| Action | Windows | Mac | Description |
|---|---|---|---|
| Run current query | Ctrl+Enter | Cmd+Return | Executes the SQL query currently in the editor (or just the statement the cursor is positioned within, if multiple statements exist), the most frequently used shortcut when actively writing and testing queries. |
| New query tab | Ctrl+T | Cmd+T | Opens a new blank query editor tab, letting you work on multiple separate queries simultaneously without losing your place in an existing one. |
| Format/beautify SQL | Ctrl+Shift+F (varies by version) | Cmd+Shift+F | Automatically reformats the current query's indentation and keyword casing according to TablePlus' SQL formatting rules, useful for cleaning up a query pasted in from elsewhere or for improving readability of a hastily written one. |
| Comment/uncomment SQL line | Ctrl+/ | Cmd+/ | Toggles a leading -- comment on the current line or selected lines within the query editor, useful for temporarily disabling part of a multi-statement query during testing. |
| View query history | Ctrl+Y (varies) | Cmd+Y | Opens a log of previously executed queries for the current connection, letting you recall and re-run a query from earlier in the session without needing to have manually saved it first. |
Grid Navigation
| Action | Windows | Mac | Description |
|---|---|---|---|
| Add new row (grid view) | Ctrl+N (grid focused) | Cmd+N | Inserts a new blank row into the currently viewed table's grid, ready for entering new column values directly, without writing a manual INSERT statement. |
| Duplicate selected row(s) | Ctrl+D | Cmd+D | Creates a copy of the selected row(s) with the same column values (auto-incrementing primary keys typically excluded/regenerated), faster than manually re-entering every field for a similar new row. |
| Delete selected row(s) | Ctrl+Backspace or Delete key | Cmd+Delete | Marks the selected row(s) for deletion, requiring a subsequent commit action to actually execute the DELETE against the database, giving you a chance to review pending changes before they're permanently applied. |
| Commit pending grid changes | Ctrl+S | Cmd+S | Executes all pending inline edits, insertions, and deletions made in the grid view against the actual database, applying changes that were staged but not yet committed. |
| Export table/query results | Right-click results > Export (no keyboard shortcut) | — | Exports the current grid view or query result set to a file format like CSV, JSON, or SQL insert statements, useful for sharing a data snapshot or migrating a subset of data elsewhere. |
Connection Management
| Action | Windows | Mac | Description |
|---|---|---|---|
| New database connection | Ctrl+N (connections list focused) | Cmd+N | Opens the new connection configuration dialog for setting up a fresh database connection profile. |
| Disconnect current connection | Ctrl+Shift+D (varies) | Cmd+Shift+D | Closes the active database connection without necessarily removing its saved connection profile, useful for freeing up connection slots on the database server or reconnecting fresh after a schema change. |
| Toggle sidebar | Ctrl+0 | Cmd+0 | Shows or hides the sidebar listing saved connections and the current connection's table/schema tree, useful for reclaiming screen space while focused on the grid or query editor. |
Frequently Asked Questions
Why do grid edits need a separate commit step instead of saving immediately?
TablePlus deliberately stages inline edits, new rows, and deletions in the grid as pending changes rather than executing each one immediately against the live database, giving you a visual review opportunity (pending changes are typically highlighted) and a chance to discard an accidental edit before it becomes a real, executed change against production or shared data — Ctrl+S (Cmd+S) is the explicit commit step that actually applies everything staged so far.
Does Run Query (Ctrl+Enter) always run the entire editor's contents?
Not necessarily — if your query editor tab contains multiple semicolon-separated SQL statements, TablePlus generally runs just the specific statement your cursor is currently positioned within by default, rather than the entire tab's contents, letting you iterate on one statement within a larger saved script without needing to select it manually each time; running the full script typically requires a separate 'run all' action rather than the standard single-query shortcut.
Does Duplicate Row copy the primary key value exactly?
Generally no for auto-incrementing primary keys — TablePlus typically excludes or regenerates an auto-increment primary key value on a duplicated row specifically to avoid an immediate primary-key-collision error on commit, since two rows can't share the same primary key value in most database schemas, though the exact behavior can depend on the specific column's configured constraints.
Why does running a query with Cmd+Enter sometimes execute more than the statement my cursor is on?
If your cursor sits inside a single SQL statement with no selection active, TablePlus executes the entire statement the cursor is currently within, determined by semicolon boundaries, rather than just the current line — so a multi-line query spanning several lines runs as one complete unit, which is usually what you want, but it can surprise you if you expected only a highlighted fragment to run and forgot that no text was actually selected.
Is there a way to quickly filter rows in a table view without writing a WHERE clause manually?
Clicking directly into a column header's filter row and typing a value applies an inline filter to that column immediately, translating your typed value into the appropriate WHERE condition behind the scenes without you needing to write or even see the underlying SQL — a fast way to narrow down a large table interactively before deciding whether the filtered result is worth turning into a saved, reusable query.
Can I connect to multiple databases at once and switch between them quickly?
Yes — TablePlus maintains a sidebar list of every saved connection, and clicking a different connection in that list switches your active context immediately, with tabs for each open connection's query results kept independently, so working across a staging and production database side by side (a common and appropriately cautious workflow) does not require closing one connection before opening the other. Color-coding each connection in the sidebar (a setting available per connection) further reduces the risk of accidentally running a destructive query against the wrong environment, since the tab and sidebar entry for production can be made visually distinct at a glance from staging or local development connections. This is a small habit worth building early since it costs nothing to set up and meaningfully reduces the risk of an accidental query landing on the wrong environment.
If I run a useful query but forget to save it, can I get it back later?
Yes, TablePlus keeps a running query history per connection accessible through a dedicated history view, letting you recall and re-run a previously executed query even if you never explicitly saved it as a named query file, which is a useful safety net for ad hoc exploratory queries written during debugging.