表结构:

mysql 表中重复数据过滤

 

 

 

 

 

 操作语句:

SET SQL_SAFE_UPDATES = 0;

eg1:delete from ybtest.student where id not in( select minId from ( select min(id) as minid from ybtest.student group by name,sex,subject,score ) as T ) ;
eg2:delete from ybtest.student where id in ( select *from ( select max(id) as maxid from ybtest.student group by name,sex,subject,score having count(*)>1) as a);

相关文章:

  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2021-10-02
  • 2021-12-16
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
猜你喜欢
  • 2022-02-18
  • 2021-10-03
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案