--方法一、
    select * from ZW_YHZDXX_30 a where ((select count(1) from zw_yhzdxx_30 b where b.yhbh = a.yhbh) > 1);
    --方法二、
    select * from ZW_YHZDXX_30 a where exists
    (select 1 from ZW_YHZDXX_30 b where a.yhbh=b.yhbh and a.rowid<>b.rowid );
     --方法三、
    --此句耗费最小,效率最高
    select * from ZW_YHZDXX_30 where yhbh in (select yhbh from ZW_YHZDXX_30 group by yhbh having count(*)>1)
     
    --eof--
    本文为风林火山博客原创,转载请注明出处:www.flcoder.com