sql 根据某个字段进行去重
select * from tablename as a
where not exists (select 1 from tablename where attachid=a.attachid and name<a.name)
参考:
https://www.cnblogs.com/nihaoyueyue/p/5892369.html
sql 根据某个字段进行去重
select * from tablename as a
where not exists (select 1 from tablename where attachid=a.attachid and name<a.name)
参考:
https://www.cnblogs.com/nihaoyueyue/p/5892369.html