Getting started with TablePlus
TablePlus is a native tool with an intuitive interface that you can use to create, query, edit and save your databases in a very fast and secure way. It currently supports PostgreSQL, MySQL, SQLite, MS SQL Server, Redshift, Redis, MariaDB and CockroachDB.
Download: https://tableplus.com
Read on 11 tips to boost your productivity with TablePlus
1. Create a Connection
TablePlus connects directly from your computer to your database server. You need to prepare your database type
, host
, port
, username
, and password
to get connected.
Your database username
and password
are stored securely on your computer and will not be synced to the server.
How to connect
- Open TablePlus app.
- From the welcome screen, click
Create a New Connection
at the bottom, or right-click on the connection view and chooseNew
. - Choose database type and hit
Create
- Configure your connection using standard properties such as host, port, user credentials, etc;
Or you can choose to import from URL, just copy and paste your URL. You can find and copy the URL from your server configuration.
For example, the URL for PostgreSQL database will have structure like this: postgres://user:password@host:port/database
2. Open SQL Query Editor
You can click on the SQL Query Editor icon near the top left, or use ⌘ + Return
(or ⌘ + E
) to open query editor. TablePlus will open the the editor with the most recent script.
3. Execute Queries
After writing your queries, press Run All
button, or use ⌘ + Enter
, and TablePlus will execute all the SQL code in the editor.
If you want to run only the current query where the cursor is poiting at, choose from the dropdown next to Run All
, choose Run Current
, or use ⌘ + ⇧ + Enter
. You can also change the default function from Run All
to Run Current
from the dropdown menu.
4. Create Tables
When viewing the items tab in the left sidebar, right-click on the sidebar and choose New Table
, or you can use + Table
button near the bottom left to create a new table.
5. Show Data from Selected Columns
You can show data from the selected rows by the column name. Click the Column
button at the bottom of the workspace window and choose which columns to show.
6. Edit data
From the table view, you can edit data inline by double-clicking on the data cell or using the toggle view in the right sidebar. The toggle view can be enabled using the toggle button at the top right or by pressing Space
.
7. Filter Data
To open filter, press the filter button at the bottom of the window or use ⌘ + F
Each filter contains there simple boxes: a dropdown list of the column names, common conditions such as equal
, contain
, IS NULL
,… and one text box to fill the value. You can apply multiple filters to quickly filter out the records you want to see.
Press filter button again or use shortcut key esc to turn off the filter.
8. Import Data
To import a CSV file to a current table:
- Choose
File
from menu bar - Choose
Import CSV
or you can right-click on the table in the left sidebar and chooseImport CSV
9. Export Data
To export a table, right-click on the table name in the left sidebar and choose Export Table
. Note that if you right-click on the data browser view, it will export only the current page of results, not the whole table.
The output file can be CSV, JSON or SQL.
10. Backup Data
You can backup your database to your local storage using TablePlus. From welcome screen, press Backup
, then choose your connection and database, and hit backup. TablePlus will export a .dump
file for you to save on your computer.
11. Restore Data
From the welcome screen, press Restore
, choose your .dump
file, choose connection and database, then hit Restore
. TablePlus will import data from the .dump
file to your selected database. You can import the .dump
file into a current database or create a new database from this window.
12. Save Changes to the Database
TablePlus does not send the queries that modify the database automatically to the server unless you confirm the changes. Therefore, after querying and editing your data from the app, you’ll need to commit the change to the database. That’s when your database actually gets modified.
Press Commit
icon near the top left segment panel or use ⌘ + K
to commit the changes to the server.
All the changes will be recorded in the history tab.