I have created a database named database.db
database.db
When I create a table in the database I get the error:Error: file is not a database
Error: file is not a database
Create database without the .db extension. for e.g. sqlite3 users //this creates a database names users
.db
sqlite3 users //this creates a database names users
You can also use
.open users
it will also create the database
and to open an existing database users.db use
.open users.db
if .db is not used new database of same name will be created