python 操作MySQL数据库使用"insert into ... on duplicate key update"报错问题
我们经常会遇到这种需求:向数据库中插入数据,如果库中已经有了该条记录就更新,没有才作插入操作.在MySql中会使用到insert into … on duplicate key update,在使用python操作"on duplicate key update"时遇到了"not all arguments converted during string formatting."错误.
原创
2017-12-14 17:34:40 ·
7015 阅读 ·
1 评论