Share SQL Query Results Instantly (Without Screenshots)
The problem in one sentence
You have a query result on screen and you need someone else to look at it within the next thirty seconds. Every existing option fails differently, and screenshots fail in six ways at once.
This post documents the workflow I settled on, four database-specific shortcuts that get the rows onto the clipboard in one command, and the parser edge cases that broke my first three implementations of Table Share.
Why screenshots are worse than you remember
A screenshot of a query result fails simultaneously on six axes:
- Not searchable. The recipient wants to find one order ID. They scroll.
- Not copyable. They need to paste a value into a ticket. They retype it.
- Not accessible. Screen readers see nothing.
- High bandwidth. A 300-row screenshot is hundreds of kilobytes. The same data as an HTML table is a small fraction of that.
- Mobile-hostile. Phone users get pinch-zoom on a flat image.
- Unsearchable archive. If you ever want to find "that query I sent in May," screenshots are invisible to your tools.
Plain-text paste has different problems but the same root cause: text is not a table, and chat clients are not table renderers. Column widths collapse the instant your values vary in length.
Comparative cost of the common options
Order-of-magnitude estimates from typical real-world use, not stopwatched lab numbers:
| Method | Time | Recipient experience | Login required? |
|---|---|---|---|
| Screenshot โ Slack | 10โ15 seconds | Image; not searchable, not copyable | No |
| Raw paste โ Slack | A few seconds | Columns collapse, unreadable for non-uniform widths | No |
| Export CSV โ email attachment | 30+ seconds | Must download, open in spreadsheet app | No |
| Paste into Google Sheets โ share | 1โ2 minutes | Clean table, but "Request Access" if perms are wrong | Yes |
| Paste โ Table Share link | Under 5 seconds | Clean HTML table, mobile responsive, searchable | No |
The Table Share row is the only one where the recipient experience doesn't degrade with table size. A 50-row Slack screenshot and a 5,000-row Slack screenshot are equally useless on a phone.
The workflow I actually use
The flow is identical regardless of database. Only the "get rows onto the clipboard" step changes.
- Run the query in whatever client you already use.
- Copy the result rows (Ctrl+A then Ctrl+C in most result panes).
- Paste into the textarea at table-share.org.
- The shareable link is auto-copied to your clipboard.
- Paste the link where you were going to put the screenshot.
The recipient sees a clean HTML table on any device. No login, no download. The data is plain HTML, so they can Ctrl+F to search, copy individual values, or forward the link.
Links auto-expire after 7 days on the free tier and up to 90 days with a Pro key. That's intentional โ the design assumes snapshot data, not living documents. If you need collaborative editing, use a real spreadsheet. If you just need to show someone what came back from the database, this is faster.
Database-specific shortcuts
Tested, working, no fluff. Pipes to clipboard on Windows (clip), macOS (pbcopy), or Linux (xclip -selection clipboard). Pick the one for your OS.
PostgreSQL (psql)
Run a one-shot query and pipe the CSV to clipboard:
psql -d mydb --csv -c "SELECT id, email, total FROM orders WHERE created_at > '2026-04-01'" | clip
Inside the psql REPL, use \copy instead:
\copy (SELECT id, email, total FROM orders) TO '/tmp/q.csv' CSV HEADER
Then open the file, select all, copy, paste.
MySQL / MariaDB
The --batch flag swaps the pretty +----+ borders for clean tab-separated output that Table Share's parser autodetects:
mysql -u user -p mydb --batch -e "SELECT id, email, total FROM orders LIMIT 100" | clip
SQLite
Configure CSV mode with headers, then run the query and copy the output:
.mode csv
.headers on
SELECT id, email, total FROM orders LIMIT 100;
GUI clients (DBeaver, Postico, TablePlus, DataGrip)
All four have a "Copy Selected as CSV" or "Copy with Headers" in the right-click menu on the results grid. Use that. The clipboard contents are exactly what the parser expects.
Edge cases the parser handles
Table Share uses PapaParse for parsing. Four cases needed conscious decisions:
1. Quoted commas in cell values
A value like "Smith, John" stays as one cell only if the database actually quotes the field. psql --csv does. The pretty-print +----+ format does not, which is one reason I always use --csv or --batch.
2. Newlines inside cells
A TEXT column containing line breaks confuses most parsers. PapaParse handles it correctly when the cell is properly quoted. If your database emits the newline raw, the parser splits the row โ again, use the structured output mode.
3. CSV formula injection
If a cell starts with =, +, -, or @, a recipient who downloads the data and opens it in Excel will execute the formula. This is a known attack class โ see OWASP CSV Injection. Table Share prefixes any such cell with a single quote on display and download, neutralizing it.
4. Delimiter autodetection
Some clients output tab-separated by default and CSV when asked. The parser autodetects which one a paste is using by counting separators in the first row. Spaces are deliberately not treated as delimiters, because column values frequently contain them.
What this is not for
To save us both time:
- Not for live dashboards. Tables are immutable once created. If your data changes hourly, share a database view or a real BI tool, not a snapshot.
- Not for confidential data without a password. Free-tier links are unguessable but not access-controlled. Pro keys unlock password protection.
- Not for very large result sets. Free tier maxes at 500 rows / 50 columns. Pro at 5,000 / 100. Beyond that, send the CSV file or use a proper data warehouse export.
Try it
The fastest test: copy any query result you have open right now, paste it on the homepage, and see what comes out. The full workflow is under five seconds and there's no account to create.
If you find a parser edge case that isn't handled, email markrhenz@table-share.org.
Share SQL Results โ
Table Share