摘要:
delete from tab where id not in ( select id from tab t1 where n1=( select min(n1) from tab t2 where s1=t1.s1 ))--------------------------------delete tab where id not in(select tab.id from tab,(select min(n1) as n1,s1 from tab group by s1) B where tab.n1=B.n1 and tab.s1=B.s1)连表的目的 是为了 得到 ID 阅读全文