原创

只显示重复记录中一条: min(rowid)

select * from tmp_yx_user_0401_qy_ok where login_name  
 in (select   login_name   from tmp_yx_user_0401_qy_ok  
  group   by   login_name    having   count(login_name) > 1)
  and rowid not in (select min(rowid) from   tmp_yx_user_0401_qy_ok   
  group by login_name   having count(login_name )>1)

正文到此结束
本文目录