OracleÁÙʱ±íʹÓÃÎÊÌâ - Oracle / ¿ª·¢
ÎҵĴ¦ÀíÊÇÕâÑùµÄ£º ÎÒÓÐÒ»¸öºÜ´óµÄÊý¾Ý¼¯ºÏ£¬´¦ÓÚÐÔÄÜ·½ÃæµÄ¿¼ÂÇÐèҪʹÓÃÁÙʱ±í¹ý¶É£¬²¢ÇÒʹÓ÷ÖÒ³µÄ·½Ê½ÏòÁÙʱ±íÖвåÈëÊý¾Ý£¬Êý¾ÝʹÓÃÍê±Ïºó£¬É¾³ýÁÙʱ±íµÄÊý¾Ý¡£ ³öÏÖµÄÏÖÏ󣺵±OracleÖØÐÂÆô¶¯ºó£¬µÚÒ»Ò³²åÈëµÄÊý¾Ý²»ÕýÈ·£¬Ö®ºóÿ´Î²åÈëµÄÊý¾Ý¾ùÕýÈ·£¨Ö»ÓÐÔÚOracleÖØÐÂÆô¶¯µÄʱºòÎȶ¨¸´ÏÖ£©¡£ Oracle°æ±¾9i£¬AIXÏ£¬Ð¡°æ±¾9.2.0.1
ÃèÊöµÃ²»Çå³þ£¬ ÕýÈ·µÄºÍ²»ÕýÈ·µÄÊý¾ÝÊÇʲô£¿ Äã˵µÄÁÙʱ±íÊÇÖ¸ÓÃcreate global temporary table....½¨Á¢µÄô? ËùνµÄÕýÈ·ÊÇ£ºÃ¿Ò³ÎÒ¶¼ÒªÏòÁÙʱ±í²åÈë200ÐÐÊý¾Ý£¬ÊÇͨ¹ýinset into selectµÄ·½Ê½£¬ÆäÖÐselect²¿·Ö°üº¬left join£¬µÚÒ»´ÎÖ´ÐÐʱ£¬²åÈëµÄ²»ÊÇ200ÐУ¬ÒÔºóÿ´ÎÖ´ÐоùÊÇ200ÐС£ ÁÙʱ±íÊÇcreate global temporary table....½¨Á¢µÄ ·ÖÒ³Óï¾äÊÇÈçºÎдµÄ£¬ÌùһϠÁíÍ⣬·ÖÒ³²»Ò»¶¨ÒªÐ´ÁÙʱ±í°¡ÒýÓà ·ÖÒ³Óï¾äÊÇÈçºÎдµÄ£¬ÌùһϠÁíÍ⣬·ÖÒ³²»Ò»¶¨ÒªÐ´ÁÙʱ±í°¡ ¶¥Ò»Ï¡£¡£¡£ÊÇ°¡ ·ÖÒ³¸ÉÂïÒ»¶¨ÒªÐ´ÁÙʱ±í°¡¡£¡£¡£ ÎÒµÄÒµÎñ±È½Ï¸´ÔÓ£¬ÐèÒª´ÓÒ»¸öÁ÷Ë®±íÖаÑÿ¸öÈ˵ÄÁ÷Ë®Êý¾Ý²éѯ³öÀ´£¬ÓÉÓÚÁ÷Ë®±íµÄÊý¾Ý±È½Ï´ó£¬ËùÒÔÏëÁËÒ»¸ö°ì·¨£¬¿¼ÂÇʹÓÃÁÙʱ±í·ÖÒ³´¦Àí£¬²»ÖªµÀÕâÑù˵¥ÉÏÄܲ»ÄÜÀí½â ÖØÆôÒÔºó£¬È«¾ÖÁÙʱ±í»á×Ô¶¯dropµôµÄ¡£²»ÖªµÀÊDz»ÊÇÕâ¸öÔÒò
Ïà¹ØÎÊ´ð£º
°²×°ÁËOracle 10g£¬Ä¬ÈÏ°²×°ÁËorclÊý¾Ý¿â£¬Õâ¸öÊý¾Ý¿âÄܲ»ÄÜɾ³ý°¡£¬»¹ÓÐÎÒÈç¹ûн¨ÁËÆäËûÊý¾Ý¿â£¬Ôõô֪µÀÔÚwebÖеǽ²»Í¬Êý¾Ý¿âµÄµØÖ·°¡£¿ 1 ¿ÉÒÔɾ³ý 2 ÔÚWEBµØÖ·À¸ÖÐÊäÈëµØÖ·µÄʱºòÖ¸¶¨Ð´´½¨µÄÊý¾Ý¿âµÄIP ......
private static final String URL = "jdbc:oracle:thin:@localhost:1521:orcl"; private static final String USERNAME = "sys"; private static final String PASSWORD = "s ......
СµÜ£¬×î½üҪתÐÐÈ¥×öoracle¿ª·¢ÁË£¬ÓÉÓÚ´óѧ±Ïҵʱ£¬×ßÁ˸öÍä·£¬ÏÖÔÚºÜСÐÄ£¬ÎÊÏ£¬×öPL/SQLÓÐûÓÐǰ;£¿£¿£¿ µ±È»ÎÒ˵µÄÕâ¸öǰ;ÊÇÖ¸ ÒÔºóÒªÌø²Û£¬Êг¡¶ÔÕâÑùµÄÈ˲ŵÄÐèÇóÁ¿´ó²»´ó£¿£¿ 3q ÄÇ¿´À´»¹Ö»ÄÜÏȽӴ ......
¼ÙÉètable01 ÖÐÓÐ ÒÔÏÂ×ÊÁÏ emp_no emp_name ------- ------------ 0001 TOM 0002 JOHN 0003 MARY ³£Óõ绰 ¶øÎÒÃÇÒªµÃµ½ÒÔϵÄOUTPUT (»òÊǸ÷ÖÖÆäËûµÄoutput) 0001,TOM 0002,JOHN
......
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001' ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......