如果要查每个相同的名字分别有多少个
select name,count(*) from table group by name对mysql快速批量修改,查重更新
UPDATE mytable
SET myfield = CASE id
WHEN 1 THEN 'value'
WHEN 2 THEN 'value'
WHEN 3 THEN 'value'
END
WHERE id IN (1,2,3)
查重
select t.* from vinstatic t inner JOIN (select vin, count(0) num from vinstatic group by vin) t1 on t.VIN=t1.vin where t1.num>1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)