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

oracleÁÙʱ±í

ÔÚOracle8i»òÒÔÉÏ°æ±¾ÖУ¬¿ÉÒÔ´´½¨ÒÔÏÂÁ½ÖÖÁÙʱ±í£º
1¡£»á»°ÌØÓеÄÁÙʱ±í
    CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>)
    ON COMMIT PRESERVE ROWS£»
 
2¡£ÊÂÎñÌØÓеÄÁÙʱ±í
    CREATE GLOBAL TEMPORARY <TABLE_NAME> (<column specification>)
    ON COMMIT DELETE ROWS£»
   CREATE GLOBAL TEMPORARY TABLE MyTempTable
Ëù½¨µÄÁÙʱ±íËäÈ»ÊÇ´æÔڵģ¬µ«ÊÇÄãÊÔÒ»ÏÂinsert Ò»Ìõ¼Ç¼ȻºóÓñðµÄÁ¬½ÓµÇÉÏÈ¥select£¬¼Ç¼Êǿյģ¬Ã÷°×ÁË°É£¬ÎÒ°ÑÏÂÃæÁ½¾ä»°ÔÙÌùһϣº
--ON COMMIT DELETE ROWS ˵Ã÷ÁÙʱ±íÊÇÊÂÎñÖ¸¶¨£¬Ã¿´ÎÌá½»ºóORACLE½«½Ø¶Ï±í£¨É¾³ýÈ«²¿ÐУ©
--ON COMMIT PRESERVE ROWS ˵Ã÷ÁÙʱ±íÊǻỰָ¶¨£¬µ±ÖжϻỰʱORACLE½«½Ø¶Ï±í¡£
³åÍ»µÄÎÊÌâ¸ü±¾²»Óÿ¼ÂÇ.
 
ÁÙʱ±íÖ»ÊDZ£´æµ±Ç°»á»°(session)Óõ½µÄÊý¾Ý£¬Êý¾ÝÖ»ÔÚÊÂÎñ»ò»á»°ÆÚ¼ä´æÔÚ¡£
 
ͨ¹ýCREATE GLOBAL TEMPORARY TABLEÃüÁî´´½¨Ò»¸öÁÙʱ±í£¬¶ÔÓÚÊÂÎñÀàÐ͵ÄÁÙʱ±í£¬
Êý¾ÝÖ»ÊÇÔÚÊÂÎñÆÚ¼ä´æÔÚ£¬¶ÔÓڻỰÀàÐ͵ÄÁÙʱ±í£¬Êý¾ÝÔڻỰÆÚ¼ä´æÔÚ¡£
 
»á»°µÄÊý¾Ý¶ÔÓÚµ±Ç°»á»°Ë½ÓС£Ã¿¸ö»á»°Ö»ÄÜ¿´µ½²¢ÐÞ¸Ä×Ô¼ºµÄÊý¾Ý¡£DMLËø²»»á¼Óµ½
ÁÙʱ±íµÄÊý¾ÝÉÏ¡£ÏÂÃæµÄÓï¾ä¿ØÖÆÐеĴæÔÚÐÔ¡£
  
¡ñ ON COMMIT DELETE ROWS ±íÃûÐÐÖ»ÊÇÔÚÊÂÎñÆÚ¼ä¿É¼û
¡ñ ON COMMIT PRESERVE ROWS ±íÃûÐÐÔÚÕû¸ö»á»°ÆÚ¼ä¿É¼û
 
¿ÉÒÔ¶ÔÁÙʱ±í´´½¨Ë÷Òý£¬ÊÓͼ£¬³ö·¢Æ÷£¬¿ÉÒÔÓÃexportºÍimport¹¤¾ßµ¼Èëµ¼³ö±íµÄ
¶¨Ò壬µ«ÊDz»Äܵ¼³öÊý¾Ý¡£±íµÄ¶¨Òå¶ÔËùÓеĻỰ¿É¼û¡£
Temporary TablesÁÙʱ±í
1¼ò½é
   ORACLEÊý¾Ý¿â³ýÁË¿ÉÒÔ±£´æÓÀ¾Ã±íÍ⣬»¹¿ÉÒÔ½¨Á¢ÁÙʱ±ítemporary tables¡£ÕâЩÁÙʱ±íÓÃÀ´±£´æÒ»¸ö»á»°SESSIONµÄÊý¾Ý£¬
   »òÕß±£´æÔÚÒ»¸öÊÂÎñÖÐÐèÒªµÄÊý¾Ý¡£µ±»á»°Í˳ö»òÕßÓû§Ìá½»commitºÍ»Ø¹örollbackÊÂÎñµÄʱºò£¬ÁÙʱ±íµÄÊý¾Ý×Ô¶¯Çå¿Õ£¬
   µ«ÊÇÁÙʱ±íµÄ½á¹¹ÒÔ¼°ÔªÊý¾Ý»¹´æ´¢ÔÚÓû§µÄÊý¾Ý×ÖµäÖС£
   ÁÙʱ±íÖ»ÔÚoracle8iÒÔ¼°ÒÔÉϲúÆ·ÖÐÖ§³Ö¡£
2Ïêϸ½éÉÜ
   OracleÁÙʱ±í·ÖΪ »á»°¼¶ÁÙʱ±í ºÍ ÊÂÎñ¼¶ÁÙʱ±í¡£
»á»°¼¶ÁÙʱ±íÊÇÖ¸ÁÙʱ±íÖеÄÊý¾ÝÖ»ÔڻỰÉúÃüÖÜÆÚÖ®ÖдæÔÚ£¬µ±Óû§Í˳ö»á»°½áÊøµÄʱºò£¬Oracle×Ô¶¯Çå³ýÁÙʱ±íÖÐÊý¾Ý¡£
ÊÂÎñ¼¶ÁÙʱ±íÊÇÖ¸ÁÙʱ±íÖÐ


Ïà¹ØÎĵµ£º

ORACLEÌåϵ½á¹¹


Ò»¡¢             ÄÚ´æ½á¹¹
¹²Ïí³Ø£º·ÖΪ¿â¸ßËÙ»º´æºÍ×Öµä¸ßËÙ»º³åÇø
¿â¸ßËÙ»º´æ£¬ÓÃÓÚ´æ´¢¾­¹ýÓï·¨·ÖÎö²¢ÇÒÕýÈ·µÄSQLÓï¾ä£¬²¢Ëæʱ׼±¸Ö´ÐС£
×Öµä¸ßËÙ»º³åÇø£¬´æ´¢µÇ½µ½ORACLEµÄÓû§Ãû£¬¼°ÕâЩÓû§ÓÐÄÄЩÊý¾Ý¿â¶ÔÏóÒÔ¼°ÕâЩÊý¾Ý¿â¶ÔÏóµÄλÖá£
Êý¾Ý»º ......

ORACLE³ÌÐò°ü

³ÌÐò°ü
 
°üÖ÷Ìå/¹æ·¶Ãû×ÖÒ»Ñù
°üÖ÷Ìå/¹æ·¶ÖеĶÔÓ¦²ÎÊý±ØÐëÀàÐͼ°Ãû×ÖÒ»Ñù
Ö»ÄÜʹÓÃÇ¿ÀàÐ͵ÄREFÓαê
 
´´½¨³ÌÐò°ü¹æ·¶
create or replace package my_pack
is
       procedure find_emp_proc(eno emp.empno%type);
       function fin ......

ORACLEÊý¾Ý¿â¶ÔÏó——ͬÒå´Ê¡¢ÐòÁС¢ÊÓͼ

ORACLEÊý¾Ý¿â¶ÔÏó
——ͬÒå´Ê¡¢ÐòÁС¢ÊÓͼ
ͬÒå´Ê£ºÍ¬Òå´ÊÊÇÏÖÓжÔÏóµÄ±ðÃû
¼ò»¯SQLÓï¾ä
Òþ²Ø¶ÔÏóµÄÃû³ÆºÍËùÓÐÕß
Ìṩ¶Ô¶ÔÏóµÄ¹«¹²·ÃÎÊ
 
ͬÒå´Ê·ÖΪ˽ÓÐͬÒå´ÊºÍ¹«ÓÐͬÒå´Ê
˽ÓÐͬÒå´ÊÖ»ÄÜÔÚÆäģʽÄÚ·ÃÎÊ£¬ÇÒ²»ÄÜÓ뵱ǰģʽµÄ¶ÔÏóͬÃû¡£
¹«ÓÐͬÒå´Ê¿É±»ËùÓеÄÊý¾Ý¿âÓû§·ÃÎÊ¡£
 
ÒÔ SYS ÓÃ ......

Oracle sysdate ʱ¼äÂýÁË£¡

×î½ü·¢ÏÖÒ»¸öÎÊÌ⣬һ¸ö9iÅÜÔÚredhat5µÄ£¬¾ÓÈ» select sysdate from dual  ³öÀ´µÄʱ¼äºÍʵ¼Êʱ¼ä²îÁ˼¸·ÖÖÓ£¬ÒòΪ»ùÓÚÕâ¸öoracleµÄϵͳʱ¼äÕýÈ·ÐÔ»¹ÊÇÓеãÒªÇóµÄ¡£ËùÒÔÖ»ÄÜ #date -s 2010-2-10 8:55:00  ÁË£¬ÔÙ#clock -w дÈëCOMS ×¢ÒâÐÞ¸Äʱ¼äµÃÔÚrootÏ¡£
ÔÚϵͳÆô¶¯Ê±£¬Linux²Ù×÷ϵͳ½«Ê±¼ä´ÓCMOSÖжÁµ½ÏµÍ³Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ