且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何确定 Python sqlite UPDATE 是否有效?

更新时间:2023-11-27 14:21:16

cursor.rowcount 如果更新成功(影响 1 行)则为 1,如果失败则为 0.

cursor.rowcount will be 1 if the update was successful (affecting 1 row) or 0 if it failed.