もらったファイルがShift-JISのCSVだったのでnkfでUTF-8に変換 %nkf -w --overwrite subjects.csv %nkf -g subjects.csv UTF-8 SQLiteで使うスキーマを別ファイルで用意(subject.sql) create table Subject ( id integer primary key, num integer not null, name text not null, credit integer not null, term integer not null, day integer, hour integer, teacher text ); 用意したファイル(subject.sql)からテーブル(Subject)を作成 %sqlite3 subject.db < subject.sql 作成