SQL 删除列中的重复值

D name
13 张三
1123 张三
15 李四
17 李四
我要得到的结果是
ID name
13 张三
15 李四
请问要怎么写

问题补充:删除重复的
在线等啊
请问具体的语法要怎么写啊???????
=====================================================
delete from 表
where id not in(select min(id) from 表 group by name )   //删除重复名字的记录

删除之前请用语句
select *
from 表
where id in(select min(id) from 表 group by name )
查看能保留下来的数据。
 
eg.delete from T_bbs_subject
where subjectId not in(select min(subjectId) from T_bbs_subject group by clsid )

相关文章:

  • 2021-12-02
  • 2022-01-21
  • 2021-09-20
  • 2021-07-03
  • 2021-06-25
  • 2021-12-21
  • 2022-02-05
猜你喜欢
  • 2021-11-26
  • 2021-09-11
  • 2021-11-15
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案