删除一个信息表中除id外其他字段都相同的冗余信息,如下

id name addr

1  a   b

2  a   b

3  b   c

删除这个表中的冗余信息

即应该是

id name addr

1  a   b

3  b   c

设table为t

Sql:delete from tableName where id not in (select min(id) from tableName group by name, addr…)

相关文章:

  • 2022-12-23
  • 2021-08-27
  • 2021-11-25
  • 2021-06-20
  • 2022-12-23
  • 2022-02-15
  • 2021-04-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-08-20
  • 2022-12-23
相关资源
相似解决方案