问题:有一个数据表,名为custom ,有两个字段(ID、title)

有一些记录的title字段重复。想把title字段重复的保留一条即可,其它全部删掉。

方法:delete from custom where id not in(select min(id) from custom group by title)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-09-02
相关资源
相似解决方案