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

oracleÎĵµµÚ¾ÅÕ´¥·¢Æ÷(1)

 µÚ¾ÅÕÂ½Ú :´¥·¢Æ÷±àÂë
    ´¥·¢Æ÷ÊÇ´æ´¢ÔÚÊý¾Ý¿â´æÖÐÒþʽµÄÔËÐлòÕß±»´¥·¢µÄÒ»¶Î³ÌÐò£¬µ±Ä³Ð©Ê¼þ·¢Éú¡£Í¨³£Çé¿öÏ£¬´¥·¢Æ÷ÖÐÖ§³Ö¿ÉÖ´ÐеÄÒ»¶Îpl/sql´úÂë¿é£¬µ±Ò»¸öinsert,update,»òÕßdeleteÃüÃû·¢ÉúÔÚÒ»¸ö±í»òÕßÊÓͼÉϵÄʱºò¡£ÆäÒ²Ö§³ÖϵͳºÍÊý¾Ý¿â»òÕß·½°¸Ê¼þ.oracleÊý¾Ý¿âÒ²Ö§³Ö´¥·¢Æ÷Öк¬ÓпÉÖ´ÐеÄpl/sql»òjava³ÌÐò.
    ¸ÃÕ½ÚÌÖÂÛdml´¥·¢Æ÷£¬instead of ´¥·¢Æ÷ºÍϵͳ´¥·¢Æ÷(Êý¾Ý¿â/·½°¸´¥·¢Æ÷),ÄÚÈÝÈçÏÂ:
 Éè¼Æ´¥·¢Æ÷
 ´´½¨´¥·¢Æ÷
 ´¥·¢Æ÷ºËÐÄ´úÂë
±àÒë´¥·¢Æ÷
ÐÞ¸ÄÒÑÓеĴ¥·¢Æ÷
(enabling and disabling triggers)ʹÓúÍ[disabling]½Ç·¢Æ÷
²é¿´´¥·¢Æ÷Ïà¹ØµÄÐÅÏ¢
´¥·¢Æ÷ʵÀý´úÂë
Óô¥·¢Æ÷ÏìÓ¦[responding]ϵͳʼþ
     9.1Éè¼Æ´¥·¢Æ÷
         ÔÚÉè¼Æ´¥·¢Æ÷ʱ£¬Ê¹ÓÃÏÂÁÐÉè¼ÆÔ­Ôò
 ´¥·¢Æ÷ÓÃÀ´±£Ö¤µ±Ò»¸öÌض¨µÄ²Ù×÷±»Ö´ÐÐʱ£¬ºÍ¸Ã²Ù×÷Ïà¹ØµÄ¶¯×÷Ò²±»Ö´ÐС£
 µ±Ò»¸öÖظ´[duplicate]¹¦ÄÜÔÚÊý¾Ý¿âÖдæÔÚ£¬´ËʱҪ±ÜÃâʹÓô¥·¢Æ÷¡£ÀýÈç,Èç¹ûÄÜÓÃÊý¾ÝÍêë·ÐÔÔ¼ÊøÀ´ÊµÏÖά²»ºÏ·¨µÄÊý¾Ý´æ´¢µ½Êý¾Ý¿âʱ£¬¾ÍûÓбØҪʹÓô¥·¢Æ÷À´ÊµÏÖÏàͬµÄ¹¦ÄÜ¡£[refect]¾Ü¾ø
ÏÞÖÆ´¥·¢Æ÷³ÌÐò´úÂëµÄ´óС£¬Èç¹û´¥·¢Æ÷µÄʵÏÖÂß¼­ÐèÒª³¬¹ý60ÐдúÂ룬ÄÇô×îºÃ°Ñ´óÁ¿µÄ´úÂë´æ´¢ÔÚÒ»¸ö´æ´¢¹ý³ÌÖУ¬È»ºóÔÚ´¥·¢Æ÷Öе÷Óøô洢¹ý³Ì¡£
regardless of[ÎÞÂÛ] ÎÞÂÛÊÇÓû§»òÕßÊý¾Ý¿â[issues]´¥·¢Æ÷ʼþ£¬´¥·¢Æ÷Êǽö½öÓÃÀ´[centralized]¼¯Öй«¹²µÄ²Ù×÷±»µ÷Óá£
²»Òª´´½¨[recursive]µÝ¹éÐԵĴ¥·¢Æ÷¡£È磬´´½¨Ò»¸öÔÚEmp_tab after updateÓïÃûµÄ´¥·¢Æ÷,ÔڸñíÖÐÓÖ¶¨ÒåÁËÒ»¸öupdate Óï¾ä£¬Ê¹¸Ã´¥·¢Æ÷µÝ²¹¹éµÄ±»µ÷ÓÃÖ±µ½ÄÚ´æÒç³ö¡£
ÒªÃ÷Öª[judiciously]µÄÓô¥·¢Æ÷,ËüÔÚÿ¸öÓû§,ÈκÎʱ¼ä±»Ö´ÐÐ,µ±Ê¼þ·¢ÉúÔÚÒѾ­¶¨ÒåºÃµÄ´¥·¢Æ÷ÉÏ.
      9.2´´½¨´¥·¢Æ÷
          ¿ÉÒÔʹÓÃÈκÎ[interactive]»¥Ïཻ»¥µÄ¹¤¾ß,Èçsql*plus »òenterprise manager,ÓÃCREATE TRIGGER statementÃüÁîÀ´´´½¨.ÔÚʹÓý»»¥¹¤¾ß±àдÍê´¥·¢Æ÷ʱ,ÔÚ³ÌÐòĩβ¼ÓÉÏ('/')×Ö·ûÊÇ[necessary]±ØÒªµÄ£¬À´Ê¹¸Õ´´½¨µÄ´¥·¢Æ÷¼¤»î[activate]¡£
        ÈçÏÂÃüÁîÔÚemp_tab±íÉÏ´´½¨Ò»¸ö´¥·¢Æ÷:
  CREATE OR REPLACE TRIGGER Print_salary_changes
  


Ïà¹ØÎĵµ£º

OracleÊý¾Ý¿âÖÐË÷ÒýµÄά»¤

×÷Õߣº  ÈÕÆÚ£º2005-12-8 1:43:32  À´Ô´£ºInternet      µã»÷£º´Î  ÆÀÂÛ
¡¡¡¡±¾ÎÄÖ»ÌÖÂÛOracleÖÐ×î³£¼ûµÄË÷Òý£¬¼´ÊÇB-treeË÷Òý¡£±¾ÎÄÖÐÉæ¼°µÄÊý¾Ý¿â°æ±¾ÊÇOracle8i¡£
¡¡¡¡Ò». ²é¿´ÏµÍ³±íÖеÄÓû§Ë÷Òý
¡¡¡¡ÔÚOracleÖУ¬SYSTEM±íÊÇ°²×°Êý¾Ý¿âʱ×Ô¶¯½¨Á¢µÄ£¬Ëü°üº¬Êý¾Ý¿âµÄÈ«²¿Êý¾ ......

¡¾ÊÕ²ØÕûÀí¡¿OracleÊý¾Ý¿âÌåϵ¼Ü¹¹

 Ô­Îļûhttp://blog.csdn.net/kele1121/archive/2009/10/30/4742051.aspxÓëhttp://www.itpub.net/thread-1105403-1-1.html
 Ëùν
Oracle
µÄÌåϵ¼Ü¹¹£¬ÊÇÖ¸
Oracle
Êý¾Ý¿â¹ÜÀíϵͳµÄµÄ×é³É²¿·ÖºÍÕâЩ×é³É²¿·ÖÖ®¼äµÄÏ໥¹Øϵ£¬°üÀ¨
ÄÚ´æ½á¹¹¡¢ºǫ́½ø³Ì¡¢ÎïÀíÓëÂß¼­½á¹¹µÈ¡£
Oracle
Êý¾Ý¿âµÄÌåϵºÜ¸´ÔÓ£¬¸´Ô ......

Oracle INSERT ALLºÍINSERT FIRST

½ñÌìµÚÒ»´ÎÖªµÀORACLEÔ­À´»¹¿ÉÒÔÕâÑùINSERTµÄ……³¤¼ûʶÁË
Ò»¡¢ÎÞÌõ¼þ INSERT ALL
¶þ¡¢Ìõ¼þ INSERT ALL
Èý¡¢Ìõ¼þ INSERT FIRST
Insert…Select
ʹÓÃInsert SelectʵÏÖͬʱÏò¶à¸ö±í²åÈë¼Ç¼
Ò»¡¢ÎÞÌõ¼þ INSERT ALL
----------------------------------------------------------------------- ......

ORACLE Rank, Dense_rank, row_number

Ŀ¼
======================================================
1.ʹÓÃrownumΪ¼Ç¼ÅÅÃû
2.ʹÓ÷ÖÎöº¯ÊýÀ´Îª¼Ç¼ÅÅÃû
3.ʹÓ÷ÖÎöº¯ÊýΪ¼Ç¼½øÐзÖ×éÅÅÃû
Ò»¡¢Ê¹ÓÃrownumΪ¼Ç¼ÅÅÃû£º
¡¾1¡¿²âÊÔ»·¾³£º
SQL> desc user_order;
Name              ......

Oracle Åú´¦ÀíÆô¶¯¹Ø±Õ·þÎñ

 OracleÔÚ×Ô¼º»úÆ÷ÉÏ×°Ò»¸öÓбØÒªµÄ£¬±Ï¾¹ÓÐʱºòÐèÒª×Ô¼ºÔÚ¼ÒѧϰһÏ£¬µ«µçÄÔ²»ÊÇ×Ô¼ºÓõģ¬»¹ÊÇд¸öÅú´¦Àí½â¾öһϣ¬ÐèÒªµÄʱºòµã»÷Ò»ÏÂÆô¶¯£¬²»ÐèÒª¾ÍÍ£Ö¹£¬ºÜ·½±ã¡£ÕâÀォ½Å±¾¸ø´ó¼Òдһ¸ö£¬»¶Ó­´ó¼ÒÕ³Ìù¿½±´¡£
Ê×ÏÈ£¬×Ô¼ºÏȽ«×Ô¼ºµÄ×Ô¶¯Æô¶¯·þÎñ¹Ø±Õ£¬²¢¼Ç¼һÏ£¬È»ºóÌæ»»½Å±¾ÖÐÏàÓ¦µÄ·þÎñÃû³Æ¼´¿É¡£×Ô¼ºÕ³Ìù³ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ