
▲ 5 r/sqlite
SQLite CLI: Exporting data to CSV, JSON, TSV, and SQL dump (quick command reference)
I put together a practical reference for exporting SQLite data from the command line.
Export as CSV:
.headers on
.mode csv
.once export.csv
select * from customer;
Export as JSON:
.mode json
.once export.json
select * from customer;
Create SQL dump:
.output dump_db.sql
.dump
I also covered:
- Using .separator for TSV
- Exporting directly to Excel with .excel
I recorded a full walkthrough with examples here if anyone wants the complete demo:
Exporting Data With SQLite
u/Massive_Show2963 — 2 days ago