TablePlus Cheatsheet

Database GUI shortcuts & tips

Database
Contents
πŸ”Œ

Connection

# Supported databases
PostgreSQL   MySQL        MariaDB
SQLite       SQL Server   Oracle
MongoDB      Redis        Cassandra
CockroachDB  DuckDB       Snowflake

# New connection
⌘N             New connection
Fill: Host, Port, User, Password, DB

# Connection methods
Direct, SSH Tunnel, TLS/SSL
Connection string / URL

# Example URL
postgresql://user:pass@localhost:5432/db
mysql://user:pass@localhost:3306/db
⌨️

Keyboard Shortcuts

⌘N             New connection
⌘T             New tab
⌘W             Close tab
βŒ˜β‡§T            Reopen closed tab
⌘K             Open quick switch
⌘P             Command palette
⌘E             Open SQL editor
⌘R             Refresh data
⌘S             Save changes (commit)
⌘Z             Discard changes
⌘F             Filter/search
⌘G             Group by
βŒ˜β‡§S            Save as SQL file
⌘1-9           Switch tabs
β‡§βŒ˜[  / β‡§βŒ˜]    Previous/next tab
πŸ’»

Query Editor

⌘E             Open SQL editor
⌘Enter         Run query
βŒ˜β‡§Enter        Run selected query
⌘;             Run current statement
⌘.             Stop query
⌘/             Toggle comment
βŒ˜β‡§L            Lowercase
βŒ˜β‡§U            Uppercase
⌘βŒ₯F            Format SQL

# Multi-cursor
βŒ₯ click        Add cursor
⌘D             Select next occurrence

# Autocomplete
Table names, columns, functions
Triggered automatically or Tab
πŸ“Š

Data Editing

# Edit cell
Double-click   Edit cell
Enter          Confirm edit
Esc            Cancel edit
βŒ˜β†©             Edit multi-line

# Row operations
⌘βŒ₯N            Insert new row
⌘⌫             Delete row
⌘C             Copy cell/row
βŒ˜β‡§C            Copy as INSERT

# Changes are staged (yellow)
⌘S             Commit changes
⌘Z             Discard all changes

# NULL values
βŒƒN / Ctrl+N    Set to NULL

# Sort
Click column header to sort
πŸ“€

Import & Export

# Export data
Right-click table β†’ Export
Formats: CSV, JSON, SQL, XML

# Export query result
Run query β†’ Export button

# Import
File β†’ Import β†’ From CSV/SQL
Drag & drop CSV file

# Database dump
Right-click DB β†’ Dump
mysqldump / pg_dump format

# Copy as
βŒ˜β‡§C            Copy as INSERT
Also: JSON, CSV, TSV, Markdown