Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 368 Bytes

import-csv-data-into-sqlite.md

File metadata and controls

20 lines (14 loc) · 368 Bytes

Import CSV data into SQLite

Data can be imported into SQLite from a CSV file with .import.

Open the database:

sqlite3 database.db

Then, import the CSV file:

-- ensures the imported file is treated as CSV
.mode csv
-- import csv data into a table
.import filename.csv table_name

.mode csv ensures the imported file is treated as CSV.