【发布时间】:2020-11-03 05:04:16
【问题描述】:
如何将列表绑定到 SQL alchemy 查询? 以下方法无效。
engine.execute("DELETE FROM testing WHERE test_id IN %s", [1,2,3])engine.execute("DELETE FROM testing WHERE test_id IN %s", tuple([1,2,3]))engine.execute("DELETE FROM testing WHERE test_id IN (%s)", [1,2,3])
他们都给我错误:not all arguments converted during string formatting
【问题讨论】:
标签: python python-3.x sqlalchemy pymysql