

The following steps show you how to export data from a table to a CSV file.įirst, click the Tools > Export menu item The SQLiteStudio provides the export function that allows you to export data in a table or the result of a query to a CSV file. >sqlite3 -header -csv c:/sqlite/chinook.db data.csv Export SQLite database to a CSV file using SQliteStudio If you have a file named query.sql that contains the script to query data, you can execute the statements in the file and export data to a CSV file. >sqlite3 -header -csv c:/sqlite/chinook.db " select * from tracks " > tracks.csv If you check the data.csv file, you will see the following output.īesides using the dot-commands, you can use the options of the sqlite3 tool to export data from the SQLite database to a CSV file.įor example, the following command exports the data from the tracks table to a CSV file named tracks.csv. The following commands select data from the customers table and export it to the data.csv file.


There are several ways to dump data from an SQLite database to a CSV file. Summary: in this tutorial, you will learn how to export SQLite database to a CSV file.
