Friday, August 14, 2015

Import a .csv file into SQLite3

First, a table with the same structure of the .csv file must be created, then this must be done:

$ sqlite3 database.sqlite

Then,

sqlite> .mode csv
sqlite> .import /path/to/csv/file.csv table_name

Alternatively, sqlite-manager can do the job as well.

No comments: