´óÁ¿SQLÓï¾äÖ´ÐÐ
±ÈÈç˵ÎÒÓÐINSERT £¬UPDATE £¬DELETE £¬SELECT Óï¾ä¸÷1000ÌõÒªÖ´ÐÐ,ÿÌõÖ´ÐеÄÊý¾ÝÁ¿¶¼ÔÚ1WÐÐÒÔÉÏ£¬Èç¹û°ÑÕâ4000ÌõÓï¾äÖ±½ÓÖ´ÐУ¬»á³öÏÖϵͳ±ÀÀ£ ÎÒÏÖÔÚÊÇÏëÒªÖ±½ÓÖ´ÐÐÕâ4000ÌõÓï¾ä£¬È»ºóÓÖ¿ÉÒÔµÈÉÏÒ»ÌõÖ´ÐÐÍê³öÏÖ½á¹ûºóÔÙÖ´ÐÐÏÂÒ»Ìõ£¬½á¹û¿ÉÊÓ£¬Ä¿Ç°ÎҵIJÙ×÷ÊÇÖðÌõÊÖ¹¤Ö´ÐÐ ÎÒÏëÎʵÄÊÇÓÐûÓа취²»ÓÃÿÌõ¶¼ÊÖ¹¤Ö´ÐУ¬µ«¸úÿÌõ¶¼ÊÖ¹¤Ö´Ðеõ½Ò»ÑùµÄ½á¹û ¿ÉÄÜ˵µÄ²»ÊǺÜÇå³þ£¬Çó½â~~~
WAITFOR Äã×ö³É¸öÑ»·,Ò»¸öÒ»¸öÔËÐоÍÊÇÁË. »òÕß°ÑËÄǧÌõдµ½Ò»Æð,ÔËÐÐ. ÀýÈç: insert sql1 insert sql2 ... update sql1 ... 順Ðò執ÐÐ~~ SQL code: WAITFOR DELAY '00:00:05' --µÈ´ý5Ãë ×ö³É´æ´¢¹ý³Ì ×ö³É¼¸¸ö´æ´¢¹ý³ÌÒýÓà Äã×ö³É¸öÑ»·,Ò»¸öÒ»¸öÔËÐоÍÊÇÁË. »òÕß°ÑËÄǧÌõдµ½Ò»Æð,ÔËÐÐ. ÀýÈç: insert sql1 insert sql2 ... update sql1 ... Õâ¸ö¸ú3Â¥Ò»Ñù ÎÒÏë˵µÄÊÇÿÌõµÄÊý¾ÝÁ¿¶¼ºÜ´ó£¬Èç¹ûÒ»ÏÂ×ÓÖ´ÐÐ4000£¬ÏµÍ³¾Í±ÀÀ£ÁË£¬»¹ÓиöÒÉÎʾÍÊÇÄѵÀÖ±½ÓÔËÐв»ÊÇÖðÐÐÖ´ÐеÄÂð£¿ÒýÓà SQL codeWAITFOR DELAY'00:00:05'--µÈ´ý5Ãë ¸öÈ˾õµÃÕâ¸öÏë·¨²»´í ºÇºÇ£¬×î¼òµ¥µÄÒ»¸ö×ö·¨£¬ÄãµÄ·þÎñÆ÷Èç¹ûÊǶàºËµÄ»° ÔÚÊý¾Ý¿â ·
Ïà¹ØÎÊ´ð£º
´ó¼ÒºÃ£¬ÇëÎÊÔÚ±íMÖÐÓÐ×ֶΣºa b c d e ÎÒÏë²é³öÆäÖÐÂú×ãÏÂÃæÈÎÒâÒ»ÏîµÄÊý¾Ý£¬1.×Ö¶Îa µÄÖµ²»ÊÇ ¡®Êé»ò±Ê»ò±¾¡¯ÖÐÈÎÒ»£¬2.aΪÊéµÄʱºò×Ö¶Îb,cÊÇ¿Õ;3.µ±aֵΪ±ÊµÄʱºòdÊÇ¿Õ;4.µ±aΪ±¾µÄʱºòb,d,e¶¼ÊÇ¿Õ;5.È ......
´ó¼Ò°ïæ¿´¿´Õâ2¸ösqlÓï¾äÄĸö²éѯµÄËٶȸü¿ìµã¡£Ð»Ð»°ïæ¡£±È½Ï׿±¡£ÔÚ×öÐÔÄܲâÊÔ¡£ select * from ±íA LEFT OUTER JOIN ±íB ON (±íA.id || ' ' =±íB.id) ,±íC , ±íD, ±íE WhereÆäËûÌõ¼þ select * ......
ÒÑÖª´ÓB,±íÖÐÕÒ³öID, NAMEÁ½ÏîÓëC±íÏàͬµÄÊý¾Ý£¬ÔÙÒÀ¾ÝB±íÖо¹ý²éѯ³öÀ´µÄID,CODEÁ½ÏîÊý¾Ý²éѯÓëA±íID,CODEÁ½ÏîÏàͬµÄÊý¾ÝÖжÔÓ¦µÄEMAILÀ´£¬²¢ÁгöÈçÏÂD±íµÄÐÎʽ£¬²»ÖªÎÒÊÇ·ñ±íʾÇå³þ£¿Âé·³°ïÎÒÁÐһϹ«Ê½ºÃÂð£¿Íò· ......
£¨1£©string ConnString = "server=localhost;integrated security=sspi;database=pubs;"; £¨2£©string strConnection="user uid=sa;pwd=123456;Database=test;Server=test;Connect ......
ÒòΪƽʱÕâÖÖ²Ù×÷±È½Ï¶à£¬Ö±½ÓÔÚÊý¾Ý¿âÉÏÊÖ¶¯ÉèÖÃΣÏÕÐԽϴó£¬ËùÒÔÏëÓÃSQLÓï¾äʵÏÖ¡£ ÔÚÍøÉÏʵÔÚËѲ»µ½½á¹û£¬ÕâÀï¸ßÊֶ࣬ϣÍûÄܵõ½´ð°¸¡£ лл¡£ ÄãÏëÔõ麼設ÖÃ? SQL code: --´´½¨²âÊÔ±í ......