I created a database named database.db
When I created a table in the database, I received an error: Error: File Not a database
nehal@nehal-Inspiron-5559:~/Desktop/UAV$sqlite3 database.db
SQLite version 3.20.1 2017-08-24 16: 21:36
Enter ".help" for usage hints.
sqlite> CREATE TABLE users(
...> password varchar(10),
...> email text ,
...> name text
...> );
Error: file is not a database
How can I solve the error?
Create a database without a .db extension. For example, sqlite3 user//This will create a database name User
I created a database named database.db
When I created a table in the database, I received an error: Error: File is not a database
nehal@nehal-Inspiron-5559:~/Desktop/UAV$sqlite3 database.db
SQLite version 3.20.1 2017-08-24 16 :21:36
Enter ".help" for usage hints.
sqlite> CREATE TABLE users(
...> password varchar(10),
...> email text,
...> name text
...> );
Error: file is not a database
How can I solve the error?
Create a database without a .db extension. For example, sqlite3 user//This will create a database name user