怎么样抽取重复记录
怎么样抽取重复记录
[A]select * from table t1 where where t1.rowed != (select max(rowed) from table t2 where t1.id=t2.id and t1.name=t2.name) 或者 select count(*), t.col_a,t.col_b from table t group by col_a,col_b having count(*)>1
如果想删除重复记录,可以把第一个语句的select替换为delete