因此,如果我使用sqlite3软件包在Python中创建数据库:
import sqlite3
con = sqlite3.connect('test.db')
我无法使用bash中的sqlite命令行打开数据库:
sqlite test.db
Unable to open database "test": file is encrypted or is not a database
但是我可以在Python中使用sqlite3连接到使用sqlite命令行创建的数据库。
如何在sqlite命令行中打开Python创建的数据库?
安装sqlite3
并在bash中使用sqlite3 test.db
。