mysql如何update含有联合唯一索引的列
黄舟
黄舟 2017-04-17 13:28:41
0
1
672

一个表的数据需要定期批量插入,于是对几个字段做了联合索引unique.
现在有需求偶尔更新某条数据,但会产生:
1062, "Duplicate entry 'oWuCHjmbxK7cvY4AaNy89l1dVrt8-oLU1vwjBUwy5-qDPGZU5CtcHv_ts-88-gh_' for key 'index2'")
的错误,请问怎么更新呢?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
刘奇

Since the index you want to update has encountered duplication and you want to update it again, the only way is to remove the index. What else can you do

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template