How to create a DB file in sqlite3 using a .schema file How to create a DB file in sqlite3 using a .schema file database database

How to create a DB file in sqlite3 using a .schema file


If that file contains only SQL commands in the correct format, get the sqlite3 command-line tool, and run it like this:

sqlite3 mydatabase.db < db.schema

Many SQLite administration tools also have functions to import such a file.