select t.* from a t where exists(select 1 from (select xm,sfzhm from a group by xm, sfzhm having count(1) >= 2) m where m.xm = t.xm and m.sfzhm = t.sfzhm) order by t.xm , t.sfzhm
select * from table_name a,table_name b where a.xm = b.sfzhm
лл2Â¥£¬ÎÒÒªµÄ¾ÍÊÇÕâÖÖ½á¹û£¬ÓÉÓÚÎÒ¸Õѧoracle,Òò´Ë»¹Çë½âÊÍÏÂÕâÌõÓï¾ä£¬ select 1 from (select xm,sfzhm from a group by xm, sfzhm having count(1) >= 2) m where m.xm = t.xm and m.sfzhm = t.sfzhm£¬ÕâÌõÓï¾äÓе㸴ÔÓ£¬Çë½âÊÍÏ£¬Ð»Ð»¡£ ÁíÍâÄÜ·ñʹ²éѯËٶȸü¿ìµã£¿
ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡ ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exist ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001' ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......