1、如何查询重复的记录,并取出指定的记录?

   select * from Table1 t1 where id in (select max(id) from Table1 t2 where t1.id=t2.id)

2、如何删除记录中重复的数据?

   delete from Table1 where id not in (select id from Table1 t1 where id in (select max(id) from Table1 t2 where t1.id=t2.id))

相关文章:

  • 2021-08-28
  • 2021-12-03
  • 2021-08-05
  • 2022-12-23
  • 2021-05-05
  • 2022-02-03
  • 2021-07-08
猜你喜欢
  • 2022-02-12
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-03-03
  • 2022-12-23
相关资源
相似解决方案