pyodbc如何获取到更新的数据量

比如说你需要更新一些数据到表中

但是你想知道我更新了多少条数据

insql = "update db set state=0 where state=1"
cursor.execute(insql)
connect.commit()
print(cursor.rowcount) # 获取更新了多少条数据
posted @ 2022-10-08 13:57  jixn  阅读(16)  评论(0)    收藏  举报  来源