Database °æ (¾«»ªÇø)

·¢ÐÅÈË: sleep (ÐÝÏ¢ÐÝÏ¢), ÐÅÇø: Database
±ê  Ìâ: ÈçºÎ½«Êý¾Ý±í¸ñÖÐÄÇЩÓ븸Êý¾Ý±í²»Ïà¹ØÁªµÄÊý¾Ý¼Ç¼É
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2000Äê12ÔÂ04ÈÕ13:58:41 ÐÇÆÚÒ»), Õ¾ÄÚÐżþ

ÈçºÎ½«Êý¾Ý±í¸ñÖÐÄÇЩÓ븸Êý¾Ý±í²»Ïà¹ØÁªµÄÊý¾Ý¼Ç¼ɾ³ý----------Ò༴½«Î¥·´Êý¾Ý²Î¿¼ÍêÕûÐÔµÄÊý¾Ý¼Ç¼ɾ³ý£¿

       
Æäʵ£¬ÔÚʹÓÃÊý¾Ý¿âÉè¼Æ¹¤¾ßÀûÓòο¼ÍêÕûÐÔ¸¨ÖúÉè¼Æ¹¤¾ßÌæÁ½¸öÏà¹ØÁªµÄÊý¾Ý±í¸ñ¶¨ÒåÊý¾Ý²Î¿¼ÍêÕûÐÔ¹æÔò£¬½«ÎÞÐëµ£ÐÄÓÐÎ¥·´Êý¾Ý²Î¿¼ÍêÕûÐÔµÄÊý¾Ý¼Ç¼³öÏÖÔÚ×ÓÊý¾Ý±í¸ñÖС£µ±È»£¬Èç¹ûÈËÏëÒª×ÔÐÐÈ¥¼ì²é×ÓÊý¾Ý±íÖÐÊÇ·ñ´æÔÚ²»Ó븸Êý¾Ý±íÏà¹ØÁªµÄÊý¾Ý¼Ç¼²¢½«Æäɾ³ý£¬¿ÉÒÔʹÓÃÒÔÏÂ
µÄ´úÂ룺

DELETE FROM ChildTableName WHERE KeyField NOT IN (SELECT keyField FROM ParentTableName)

ÆäÖеÄChildTableName´ú±íÁËÊý¾Ý±íµÄÃû³Æ£¬ParentTableName´ú±í¸¸Êý¾Ý±íµÄÃû³Æ£¬keyFieldÔòÊÇÓÃÒÔÁ¬½á¸¸×ÓÁ½Êý¾Ý±í¸ñµÄ¹Ø¼ü×Ö¡£
 

--
¡ù À´Ô´:¡¤¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn¡¤[FROM: 202.118.227.121]
[°Ù±¦Ïä] [·µ»ØÊ×Ò³] [Éϼ¶Ä¿Â¼] [¸ùĿ¼] [·µ»Ø¶¥²¿] [Ë¢ÐÂ] [·µ»Ø]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º2.611ºÁÃë