select * from tablename as a where not exists (select 1 from tablename where attachid=a.attachid and name<a.name)
mysql另一种去重方式
select * from table group by name
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3