解决方法,在update之后加上IGNORE就好了
update IGNORE customer set capital_number = CONVERT(capital,SIGNED) where capital like '%测试数据%' and capital_number is null
本文介绍了一种在MySQL中使用UPDATE IGNORE语句结合数据类型转换的方法,解决了在更新操作中遇到的数据类型不匹配的问题。通过将非数字字符串转化为整数,确保了数据的一致性和完整性。
解决方法,在update之后加上IGNORE就好了
update IGNORE customer set capital_number = CONVERT(capital,SIGNED) where capital like '%测试数据%' and capital_number is null
1809
5040

被折叠的 条评论
为什么被折叠?