2022-08-16 sqlite3, IntegrityEr

2022-08-15  本文已影响0人  netppp

https://www.cnblogs.com/sddai/p/10592091.html

http://www.chenxm.cc/article/1110.html.html
解决方案: Change INSERT to INSERT OR IGNORE

在使用sqlite, 使用语句insert or replace into 或者是 insert or ignore into

sqlite3, IntegrityError: UNIQUE constraint failed when inserting a value

解决方法:

需要把字段添加成唯一索引值。

上一篇下一篇

猜你喜欢

热点阅读