HITSY °æ (¾«»ªÇø)

·¢ÐÅÈË: lyfe (ÐÞÉíÑøÐÔ), ÐÅÇø: HITSY
±ê  Ìâ:  PBÖжÔÊý¾Ý¿â¼ÓËø(תÔØ)
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2002Äê04ÔÂ06ÈÕ13:12:11 ÐÇÆÚÁù), Õ¾ÄÚÐżþ

¡¾ ÒÔÏÂÎÄ×ÖתÔØ×Ô Database ÌÖÂÛÇø ¡¿
¡¾ Ô­ÎÄÓÉ lqing Ëù·¢±í ¡¿
·¢ÐÅÈË: mont (¿Õ¾Æ°É), ÐÅÇø: Sybase                                             
±ê  Ìâ: PBÖжÔÊý¾Ý¿â¼ÓËø                                                        
·¢ÐÅÕ¾: »ªÄÏÍøľÃÞÕ¾ (Wed Mar 24 09:37:47 1999), ×ªÐÅ                           
                                                                                
: Èç¹ûÎÒÏëÔÚÒ»¸öÊÂÎñÖÐÒªÏȲéѯijһֵ£¬È»ºóÐÞ¸ÄËü£¬µ«ÎÒÏ£ÍûÔÚ´ËÆÚ¼äÆäËü¶Ô¸Ã¼Ç¼  
: ½øÐÐÐ޸ĵIJÙ×÷¾ù²»ÄܽøÐУ¬Ò²¾ÍÊÇ˵£¬ÎÒÏ£Íû²éѯ֮ǰ¶Ô¸Ã¼Ç¼¼ÓËø£¬Ð޸ijɹ¦Ö®ºó  
: ÔÙÊÍ·Å£¬ÔÚPBÓëMS SQL Server»·¾³ÏÂÈçºÎʵÏÖ£¿¶àлָ½Ì£¡                         
Èç¹û×Ô¼ºÊ¹ÓÃDBµÄÊÂÎñ¹ÜÀíÖ¸Áî½øÐÐÊÂÎñ¹ÜÀíµÄ»°£¬ÏÈÁîpowerbuilderÍ£Ö¹¹ÜÀíÊÂÎñ£¬    
¼´ÉèÖÃÊÂÎñ¶ÔÏóµÄautocommitΪtrue£¬ÏµÍ³ÄÚ²¿¾Í²»»á×Ô¶¯½¨¹¹ÊÂÎñ´¦ÀíµÄÃüÁîÁË¡£      
ʵÏÖÈ˹¤ÊÂÎñ´¦ÀíµÄ·½Ê½ÊDzÉÓÃexecute immediateÓï¾ä£¬½«ÄãµÄÊý¾Ý¿âÖ¸Áîд³É×Ö·û´®£¬ 
¾Í¿ÉÒÔÖ´ÐвÙ×÷¡£                                                                
±ÈÈç˵£¬ÔÚSQL SERVER ÖУ¬Òª½â¾öÄãµÄÎÊÌâ¿ÉÒÔÕâÑù¿¼ÂÇ£º                           
  SQL SERVER 6.5ÒÔÇ°µÄ°æ±¾ÖУ¬²»ÄÜͬʱÑéÖ¤ÐÞ¸ÄÁеÄÐÂÖµºÍÀÏÖµ£¬´ÓSELECTÓï¾ä·µ»Øµ 
ÖµÔÚUPDATEʱ²»Äܱ£Ö¤£¬ËùÒÔÄãÐèÒª¶¨ÒåʹÓÃÁËHOLDLOCKÏÔʽ¶¨ÒåµÄÊÂÎñ¡££¨ÏÂÃæµÄÓï¾äÔ 
pbÖÐʹÓÃʱ¶¼Òª¼ÓÉÏexecute immediateÓï¾ä£©                                       
  BEGIN TRANSACTION                                                             
  SELECT variable_name=column_name1 from table_name                  
  where column_name2=expression holdlock                                        
  UPDATE table_name SET column_name1=expression where column_name2=expression.  
  COMMIT TRANSTACTION                                                           
  ²»ÕýÖ®´¦ÇëÖ¸½Ì¡£                                                              
                                                                                
ÆÀ£º  ÕâЩ¶¼ÊDZê×¼µÄSQLÓï¾ä£¬ÏÔÈ»ÕâЩ¼ÓËøÊÇÓÉDBMSÌṩµÄ¹¦ÄÜ£¬ºÜ¶àSQL·þÎñÆ÷      
¶¼ÓÐÕâÑùµÄÃüÁ²»¹ý±í´ï·½Ê½²»Í¬¡£    

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