Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÇÚÕÜEXCEL·þÎñÆ÷×óÓÒÄÚÁ¬½Ó¼°ÔÚSQLÓï¾äµÄʵ¼Ê×÷ÓÃ

   ÔÚÇÚÕÜEXCEL·þÎñÆ÷ÖÐÓÐ×óÓÒÄÚÁ¬½ÓµÄ²Ù×÷£¬ÎÒÃÇÔÚÕâÀïÓÃSQLÓï¾äÀ´Êµ¼Ê˵Ã÷Ò»ÏÂÖ®¼äµÄÇø±ðÓë×÷Óá£
    =     ÄÚÁ¬½Ó  SQLÖÐΪinner join
   *=    ×óÁ¬½Ó °üº¬ËùÓеÄ×ó±ß±íÖеļǼÉõÖÁÊÇÓұ߱íÖÐûÓкÍËüÆ¥ÅäµÄ¼Ç¼¡£ SQLÖÐΪleft join
    =*   ÓÒÁ¬½Ó °üº¬ËùÓеÄÓұ߱íÖеļǼÉõÖÁÊÇ×ó±ß±íÖÐûÓкÍËüÆ¥ÅäµÄ¼Ç¼¡£ SQLÖÐΪright join
    ÔÚSQLÓï¾äÖУº
    ¿ÉÒÔÔÚ from ×Ó¾äÖÐʹÓÃINNER JOINÔËËã¡£.ÕâÊÇ×îÆÕͨµÄÁª½ÓÀàÐÍ¡£Ö»ÒªÔÚÕâÁ½¸ö±íµÄ¹«¹²×Ö¶ÎÖ®ÖÐÓÐÏà·ûÖµ£¬ÄÚ²¿Áª½Ó½«×éºÏÁ½¸ö±íÖеļǼ¡£
    Óà LEFT JOIN ÔËËã ´´½¨×ó±ßÍⲿÁª½Ó.×ó±ßÍⲿÁª½Ó½«°üº¬ÁË´ÓµÚÒ»¸ö£¨×ó±ß£©¿ªÊ¼µÄÁ½¸ö±íÖеÄÈ«²¿¼Ç¼£¬¼´Ê¹ÔÚµÚ¶þ¸ö£¨Óұߣ©±íÖв¢Ã»ÓÐÏà·ûÖµµÄ¼Ç¼¡£
    ÓÃRIGHT JOIN ÔËËã ´´½¨ ÓÒ±ßÍⲿÁª½Ó.ÓÒ±ßÍⲿÁª½Ó½«°üº¬ÁË´ÓµÚ¶þ¸ö£¨Óұߣ©¿ªÊ¼µÄÁ½¸ö±íÖеÄÈ«²¿¼Ç¼£¬¼´Ê¹ÔÚµÚÒ»¸ö£¨×ó±ß£©±íÖв¢Ã»ÓÐÆ¥ÅäÖµµÄ¼Ç¼¡£
    ÀýÈ磬¿ÉÒÔʹÓà LEFT JOIN Ó벿ÃÅ£¨×ó±ß£©¼°Ô±¹¤£¨Óұߣ©±íÀ´Ñ¡ÔñËùÓеIJ¿ÃÅ£¬°üº¬ÁËûÓзÖÅäµ½Ô±¹¤µÄ²¿ÃÅ¡£¿ÉÒÔʹÓà RIGHT JOIN Ñ¡ÔñËùÓеÄÔ±¹¤£¬°üº¬ÁËûÓзÖÅäµ½²¿ÃŵÄÔ±¹¤¡£
    ÏÂÁÐʾÀýÏÔʾÈçºÎÔÚÀà±êʶ·û×Ö¶ÎÖÐÁª½ÓÀà±í¼°²úÆ·±í¡£²éѯ½«»áÁгöËùÓÐÖÖÀàµÄÁÐ±í£¬°üº¬ÄÇЩûÓвúÆ·ÔÚÆäÖеÄÖÖÀࣺ
     SELECT CategoryName,
     ProductName
     from Categories LEFT JOIN Products
     ON Categories.CategoryID = Products.CategoryID;


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

SQL Server 2000°²×°¹ÒÆðµÄ½â¾ö°ì·¨

ÒÔÇ°ÔÚ°²×°sqlµÄʱºò£¬Èç´ËÌáʾ£¬ÎÒÖ»ÒªÖØÐÂÆô¶¯¼´¿É£¬¿ÉÊǽñÌìÖØÐÂÆô¶¯ÁËN´Î¼ÆËã»ú£¬ÎÊÌâÈ´Ë¿ºÁûÓнâ¾ö£¬ÒÀÈ»ÌáʾÕâÑùµÄ»°¡£“ÒÔÇ°µÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷¡£ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú¡£” Ö»ºÃgoogleÒÔÏ£¬×îÖÕµÃÖªÊÇ°²×°³ÌÐòÔÚÏÈÇ°µÄ°²×°¹ý³ÌÖÐÔÚϵͳע²á±íÁôÏÂijЩÐÅÏ¢£ ......

¸öÈË×ܽáµÄ¼¸Ìõ±È½ÏÓÐÒâ˼µÄsqlÓï¾ä


 
--------------------------------------------------------------------
-- ×÷ÕߣºÕÅ°®¹ú
-- ÈÕÆÚ£º2010-01-23 15:00:17
-- ÃèÊö: һЩ±È½ÏÓÐÒâ˼µÄSQLÓï¾ä
-- Version:
--    Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)
--    Feb  9 2007 22:47:0 ......

´¦ÀíSQL ServerÊý¾Ý¿âÖеĹÂÁ¢Óû§(ͼ)

´¦ÀíSQL ServerÊý¾Ý¿âÖеĹÂÁ¢Óû§(ͼ)
°ÑÊý¾Ý¿â´ÓÒ»¸ö·þÎñÆ÷ʵÀý¸½¼ÓºÍ»Ö¸´µ½ÁíÒ»¸öʵÀýÖÐÊÇÊý¾Ý¿â¹ÜÀíÔ±Ö´Ðеij£¼ûµÄÈÎÎñ¡£¸½¼Ó»òÕ߻ָ´Ò»¸öÊý¾Ý¿âÖ®ºó£¬Ö®Ç°ÔÚÊý¾Ý¿âÖд´½¨ºÍÅäÖõĵǼÃûÒѾ­²»ÄÜ·ÃÎÊÁË¡£Õâ¸öÎÊÌâ×î³£¼ûµÄÖ¢×´ÊÇÓ¦ÓóÌÐò»áÓöµ½µÇ¼ʧ°ÜµÄ´íÎ󣬻òÕßÊǵ±ÄãÊÔ×ŰѵǼÃûÌí¼Óµ½Êý¾Ý¿âÖÐʱ£¬Äã¿ÉÄÜ»áµÃµ½Ò» ......

SQL ServerÊý¾Ý¿âÊÂÎñÈÕÖ¾´æ´¢ÐòÁÐ

Èç¹ûÄãµÄÊý¾Ý¿âÔËÐÐÔÚÍêÕû»òÊÇÅúÁ¿ÈÕÖ¾»Ö¸´Ä£Ê½Ï£¬ÄÇôÄã¾ÍÐèҪʹÓÃ×÷Òµ(job)À´¶¨ÆÚ±¸·ÝÊÂÎñÈÕÖ¾£¬±£³ÖÄãµÄÊÂÎñÎļþ´óС´¦ÔÚÒ»¸ö¿É¹ÜÀíµÄ·¶Î§¡£µ±ÄãÐèÒª»¹Ô­ÊÂÎñÈÕ־ʱ£¬Äã¾ÍÐèÒª°´ÕÕ´´½¨ÊÂÎñÈÕÖ¾µÄ˳ÐòÀ´»Ö¸´ËüÃÇ¡£Äã¿ÉÒԲο¼´æÔÚmsdb..backupset±íÖеÄÐÅÏ¢À´È·¶¨»¹Ô­ÎļþµÄ˳Ðò£¬Ê¹ÓÃFirstLSNºÍLastLSNÁеÄÖµ×÷²Î¿¼¡£µ±Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ