题是这样的tab1表中有Id和phone两个字段,其中ID是主键,phone字段中有很多重复的记录,写一条sql语句删除重复的记录

 delete from tab1 where id not in
(SELECT max(id) FROM tab1 GROUP BY phone)

测试通过。。。

相关文章:

  • 2021-08-08
  • 2021-12-31
  • 2021-06-29
  • 2021-06-10
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-04-14
  • 2021-06-27
  • 2021-05-19
  • 2021-09-04
相关资源
相似解决方案