mysql更新多条数据

更新单条数据,

update user set sex = 1 where mobile = '15000001111';

更新user表字段sex为1,条件是mobile为15000001111

更新多条同样的数据就可以用 in

update user set sex = 1 where mobile in('15000001111','15000001112',...);

用‘,’分割。

猜你喜欢

转载自blog.csdn.net/fanlixing6/article/details/81353235
今日推荐