dau: type those three letters in the editor and the whole statement expands, cursor already in place.
The Favorites tab holds databases, tables, saved SQL, a Team Library on a Team license, and any linked folders of .sql files.
Database favorites
Start with the star. It lives only in the Tree layout (View > Sidebar as Tree), so use the menu bar in a flat list or from the keyboard.
The star files the database under Unassigned. A right-click sets the environment in one move: Add to Favorites > Production. Once a database is a favorite, that submenu reads Environment. Right-clicking inside a multiple selection acts on the whole selection.
In the Favorites tab, databases come first, one row per environment. The Environment menu narrows the list to one group; the search field filters by name. Double-click, or press
Return, to switch to a database. Right-click for Use as Active Database, a different environment, or Remove from Favorites. Delete removes it too.


Favorite databases grouped by environment
Table favorites
Hover a table row and click the star at its trailing edge, or right-click and choose Add to Favorites. A pinned row keeps its star, filled and yellow. Pinned tables sit under Tables in the Favorites tab. Double-click, or pressReturn, to open one. Its right-click menu has Open Table, Show ER Diagram, and Remove from Favorites; Delete removes the selection.
Table favorites are scoped to the connection, database, and schema, and sync through iCloud. One whose table is missing from the database you are browsing is hidden rather than shown broken.
Recent tables
Turn on Show recent tables in General settings for a Recent section at the top of the object list. It holds the last 10 tables per connection and database, newest first, and stepping through preview tabs records only the one you stop on. Click a row to reopen the table. Right-click to remove one entry or clear the list. Recents stay on this Mac.Saving a query
The dialog takes a name, the SQL, and an optional keyword. Select Global for a query that names nothing specific to one database. Leave it off and the favorite belongs to the connection you are in, and goes with it when that connection is deleted.


Creating a new SQL favorite
Keywords
A keyword is what you type instead of the query. Type its first letters, in any case, and the favorite appears in the completion popup with a star;Tab or Return inserts the SQL. See Autocomplete.
Two favorites in one scope cannot share a keyword, and the dialog says so as you type.


Keyword expansion in the editor autocomplete
Cursor placement
Put;; in the SQL to say where the cursor lands. The marker is removed on insert:
orders., ready for a column name. Only the first ;; counts; without one it lands at the end.
Working with saved queries
Double-click a favorite, or pressReturn, to insert it into the editor. The right-click menu has Insert in Editor, Run in New Tab, Copy Query, Edit…, Move to, and Delete. Arrow keys move between rows, typing jumps to a name, and Delete asks first.
Folders come from the same background menu. A folder’s own menu has Rename, New Favorite…, New Subfolder, and Delete Folder; deleting one moves what was inside up to the parent level. Drag a query or a linked file out of the sidebar to drop its SQL into the editor or another app.
Team Library
On a Team license the Favorites tab gains a Team Library section holding what your team published. Double-click one, or pressReturn, to run it in a new tab.
To publish your own, right-click empty space and choose Publish Saved Queries to Team… It replaces everything you published before. See Team Plan.
Linked SQL folders
Link a folder of.sql files on disk and they appear next to your saved queries. The point is a Git repo of shared queries: clone it, link it, and a git pull keeps the team current.
This is not Linked Folders, which watches a folder of shared
.tablepro connection files..sql, .psql, and .pgsql are indexed, subfolders nest the way they do on disk, and hidden files are skipped.
Linked folders are global, so every connection shows them. Only the first 4 KB of each file is read to build the sidebar, so a large repo stays cheap.
Editing files
Click a linked file to open it as an ordinary editor tab.Cmd+S writes back in the encoding the file was read with, detected from the file itself and falling back to UTF-8, then ISO Latin-1.
A file changed on disk gets the same banner and diff sheet as any other SQL file. Files added and removed outside TablePro reach the sidebar a second later.
A non-UTF-8 file carries a yellow warning triangle. Saving keeps its encoding, and a character it cannot represent, an emoji in an ISO Latin-1 file, fails the save with an error rather than dropping the character.
Frontmatter
Leading SQL comments set the name, the keyword, and the tooltip:
The parser stops at the first line that is not one of these, so they go at the very top. Keys are case-insensitive and a UTF-8 BOM is handled. A file without frontmatter appears under its filename with no keyword. The
;; cursor marker works here too.
Right-click a row and choose Edit Metadata… to change frontmatter without opening the file. The dialog rewrites the leading comment block and leaves the rest, and the encoding, alone.
Managing linked files
PressDelete on a linked file, or right-click and choose Move File to Trash: it goes to the macOS Trash and stays recoverable. The rest of that menu is Open in Editor, Edit Metadata…, Copy Query, and Show in Finder.
A folder’s root row carries Show in Finder, Copy Path, Disable, Reload, Add Another SQL Folder…, and Remove from Sidebar. Removing unlinks the folder and leaves the files where they are.
Linked folder paths are the one part of Favorites that does not sync, so each Mac links its own copy.
