Importing CSV file into SQLite database is easy. First, ensure that the first line from the CSV file contains the column names. Then, from the SQLite console, you simply need to define the
.separator and then fire the
.import commands. Here is a example where I import myfile.csv into mytable in the my.db database file.
>sqlite3 my.db sqlite> .separator ',' sqlite> .import myfile.csv mytable sqlite>