Know About How to Create SQLite Database File

In this post we are describing about create SQLite database file, first will need to install SQLite in your PC to creating database  that is very simple process. If you have any issue during installing SQLite,  then click here to know about how to install SQLite in simple steps.
The sqlite3 command is used to be a new SQLite database. You can use it without having any special requirement.




Example to Create SQLite DB File
If you want to create new database (Company.db) for SQLite use it as follows
$sqlite3 company.db
SQLite version 3.7.15.2 2013-01-09 11:53:05
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>


The above command will save in Company.db and it is a SQLite database. Mostly users know that SQLite is an open source program so you can use it according to your need and describe more commands also.
You can check the database that created by using using SQLite .databases commands as follows.
sqlite>.databases
seq  name             file
---  ---------------  ----------------------
0    main             /home/sqlite/Company.db
You will need to use .quit command of SQLite to come out the prompt
sqlite>.quit
$


If you want to export Company.db database file in a text file, use following command
$sqlite3 Company.db .dump > Company.sql

The .dumb command has capability to convert company.db to company.sqlite with content  and you can restore it also simply as
$sqlite3 Company.db < Company.sql