【发布时间】:2012-05-19 06:29:48
【问题描述】:
我有一个列表列表:myList = [[123, 345], [23, 45], [54, 34]]
我想做这样的事情:
cursor.executemany("update tablename set flag = 'yes' where id = %s and officeid = %s", myList)
我搜索了这个并没有找到解决方案。如果永远不会实现,那么在不必循环遍历列表中的所有元素的情况下,有什么更好的更新语句?
【问题讨论】:
标签: python mysql list executemany