关于update 表名 set 字段1 = 值1 and 字段2 = 值2的执行结果说明

技术交流群: 233513714

如果执行了以下的语句,则brand等于‘OPPO’条件所对应的数据不会做改变,但是sequence_brand列除brand = 'OPPO'之外的所有数据都会变为0

错误语句:update t_insurance_phone_list set sequence_brand = 5 and brand = 'OPPO'

正确语句:update t_insurance_phone_list set sequence_brand = 5 ,brand = 'OPPO'

原文地址:https://www.cnblogs.com/cnndevelop/p/6400520.html