Sqlite Error: file is not a database

后端 未结 2 1056
挽巷
挽巷 2021-01-04 23:33

I have created a database named database.db

When I create a table in the database I get the error:Error: file is not a database

<
相关标签:
2条回答
  • 2021-01-05 00:11

    Create database without the .db extension.
    for e.g. sqlite3 users //this creates a database names users

    0 讨论(0)
  • 2021-01-05 00:24

    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

    0 讨论(0)
提交回复
热议问题