General Note: Here we have pulled in the data from a sample database. You can download it from the following link and use it for practicing Click Here For Sample Database
In this tutorial, you will learn how to import data in SQLite. Importing file data into table is easy in SQLite. If the file format is csv means,its more easy for us. To import file data into table we will use .import keyword.
Here , we are going to practise how to import a csv file . so do the following steps
sqlite> .separator ","
beacuse csv files data are separated by comma. so here we telling the compiler to look for comma as separator. create a table with id and name column.
create table table_name(id int(10),name text);
then create a csv file with id and name column. Fill some random data. then place the csv file into your working location
sqlite> .import file_name.csv table_name
sqlite> .import file_name.csv fullpath/table_name
If you need more details regarding this ,follow the link http://ampersandacademy.com/tutorials/create-sample-database-sqlite/