sql题型

1、删除重复的值的行。

SQL 删除列中的重复值

D name 
13 张三 
1123 张三 
15 李四 
17 李四 
我要得到的结果是 
ID name 
13 张三 
15 李四 

答案:delete from 表 where id not in(select min(id) from 表 group by name )   //删除重复名字的记录

原文地址:https://www.cnblogs.com/bugY/p/2333221.html