Sqlite错误:文件不是数据库

use*_*441 6 sqlite

我创建了一个名为的数据库 database.db

当我在数据库中创建一个表时,我收到错误: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
Run Code Online (Sandbox Code Playgroud)

我该如何解决错误?

use*_*441 6

创建没有.db扩展名的数据库.
例如sqlite3 users //this creates a database names users

  • 您能否提供参考来如何使用此解决方案?谢谢 (3认同)