ºìÁªLinuxÃÅ»§
Linux°ïÖú

×¢Ò⣺OracleÖеÄÁªºÏÖ÷¼ü²éѯÎÊÌâ

·¢²¼Ê±¼ä:2006-10-01 10:06:04À´Ô´:ºìÁª×÷Õß:ĪÞÈ
¡¡¡¡×î½üÒª½øÐе¼ÊýµÄ¹¤×÷£¬´ÓºÃ¼¸ÕűíÖе¼Èëµ½Ò»ÕÅ±í£¬ÆäÖÐÊý¾Ý¿ÉÄÜÖظ´£¬ËùÒÔÔÚµ¼Èë֮ǰҪ½øÐÐÊý¾ÝµÄ±È¶Ô¡£

¡¡¡¡·½·¨Ò»£ºÎÒÓÃgroup by having count(*)>1½«Öظ´µÄÊý¾ÝÌáÈ¡³öÀ´£¬È»ºó½øÐÐÈ˹¤±È¶Ô£¬ÊÂʵ֤Ã÷£¬Óй»±¿µÄ£¡

¡¡¡¡·½·¨¶þ£ºÇë½ÌÁËһλ×ÊÉîÈËÔ±£¬ÌṩÁËÒ»¸ö¸üºÃµÄ·½·¨¡£¾ÍÊǽ«Èý¸ö×Ö¶ÎÁ¬½ÓÆðÀ´×÷ΪÖ÷¼ü£¬½øÐÐÊý¾ÝÊÇ·ñÖظ´µÄÅжϡ£ÕâÀïÖµµÃ×¢ÒâµÄÊÇijÁеÄÖµ¿ÉÄÜΪ¿Õ£¬ËùÒÔÒª¸³Ò»¸ö¿Õ×Ö·û´®¹ýÈ¥¡£

[code]select * from t1 where nvl(col1,'')|| nvl(col2,'')|
| col3 not in (select col1||col2||col3 from t2)[/code]

¡¡¡¡È»ºó½«²»Öظ´µÄÖµ£¬²åÈët2¾Í¿ÉÒÔÁË¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ