相关疑难解决方法(0)

从sqlite表中选择使用python sqlite3的列表中的rowid - DB-API 2.0

以下作品:

>>> cursor.execute("select * from sqlitetable where rowid in (2,3);")
Run Code Online (Sandbox Code Playgroud)

以下不是:

>>> cursor.execute("select * from sqlitetable where rowid in (?) ", [[2,3]] )
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
Run Code Online (Sandbox Code Playgroud)

有没有办法传入python列表而不必先将其格式化为字符串?

python sqlite

19
推荐指数
2
解决办法
1万
查看次数

标签 统计

python ×1

sqlite ×1