Make sure you have sqlite3
available:
$ sudo apt install sqlite3
Also, make sure your .csv
file has a header.
Then:
$ sqlite3 <<EOF \
.mode csv \
.import "~/my_data.csv" my_table \
.schema my_table \
EOF
Kudos to this Stack Overflow answer.
Top comments (0)