美文网首页
2022-08-16 sqlite3, IntegrityEr

2022-08-16 sqlite3, IntegrityEr

作者: netppp | 来源:发表于2022-08-15 09:55 被阅读0次

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

解决方法:

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

相关文章

网友评论

      本文标题:2022-08-16 sqlite3, IntegrityEr

      本文链接:https://www.haomeiwen.com/subject/ppyrgrtx.html