求助mysql选择删除部分数据操作

2025-06-22 17:37:18
推荐回答(2个)
回答1:

update AA set ip=NULL where left(trim(ip),10)="192.168.1." and right(trim(ip),3)>=100 and right(trim(ip),3)<=200

回答2:

确认下,是不是需要删除100到200网段间的ip;sql如下:

delete from AA where (ip like '192.168.1.1%' and length(ip)=13 )or ip='192.168.1.200';