How can I create the schema (tables) by an sql script in Sqlite3? I know I can do that via sqlitebrowser, but what if I want a user on a different computer just to run my db_schema.sql to create all the tables before it run an application working with the database?
Asked
Active
Viewed 1,467 times
1 Answers
0
You can create a database file and initialize the schema with a single command from a command prompt by redirecting the input to your script file like this:
sqlite3 my_database.db < db_schema.sql

paytonbissell
- 16
- 1