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

oracle ±Ê¼Ç V Ö®´¥·¢Æ÷ (TRIGGER)

 ´¥·¢Æ÷ trigger
·ÖÀࣺǰ´¥·¢£¬ºó´¥·¢
      Ðд¥·¢Æ÷£¬Óï¾ä´¥·¢Æ÷
Ðд¥·¢Æ÷ÓëÓï¾ä´¥·¢Æ÷µÄÇø±ð£º
Ðд¥·¢Æ÷ÒªÇóµ±Ò»¸ö DML Óï¾ä²Ù×÷Ó°ÏìÊý¾Ý¿âÖеĶàÐÐÊý¾Ýʱ£¬¶ÔÓÚÆäÖеÄÿ¸öÊý¾ÝÐУ¬Ö»ÒªËüÃÇ·ûºÏ´¥·¢Ô¼ÊøÌõ¼þ£¬¾ù¼¤»îÒ»´Î´¥·¢Æ÷,FOR EACH ROW Ñ¡Ïî˵Ã÷´¥·¢Æ÷ΪÐд¥·¢Æ÷£»
Óï¾ä´¥·¢Æ÷½«Õû¸öÓï¾ä²Ù×÷ ×÷Ϊ´¥·¢Ê¼þ£¬µ±ËüÃÇ·ûºÏÔ¼ÊøÌõ¼þʱ£¬¼¤»îÒ»´Î´¥·¢Æ÷
´´½¨Óï·¨:
create or replace trigger trigger_name
       before |after
       insert |delete | update |{[of column[,column ...]]
       on [schema.]table_name
 for each row
       [when condition]
 trigger_body;
eg(×ÐϸÌå»á):
create or replace trigger hello_tri
        before insert or delete or update on emp
        for each row
begin
       dbms_output.put_line('ÎÒÊÇ´¥·¢Æ÷£¡');
end;


Ïà¹ØÎĵµ£º

oracle ±Ê¼Ç III Ö®´æ´¢¹ý³ÌÓ뺯Êý

DML(Manipulation):Êý¾Ý²Ù×÷ÓïÑÔ
CRUD
DDL(Definition): Êý¾Ý¶¨ÒåÓïÑÔ,Óë±í£¬Ë÷Òý£¬Í¬Òå´ÊÓйØ
create,alter,drop,rename,truncate(Çå¿Õ)
DCL(Control): Êý¾Ý¿ØÖÆÓïÑÔ£¬ÓëȨÏÞÓйØ
grant,revoke
TCL(Transaction Control): ÊÂÎñ¿ØÖÆÓïÑÔ,ÓëÊÂÎñÓйØ
commit,rollback,savepoint
==========================
´æ´¢ ......

Oracle×Ö·û´®º¯Êý

 1.ASCII 
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý; 
SQL> select ascii(’A’) A,ascii(’a’) a,ascii(’0’) zero,ascii(’ ’) space from dual; 
A A ZERO SPACE 
--------- --------- --------- --------- 
65 97 48 32
2.CHR 
¸ø³öÕ ......

oracle ±Ê¼Ç VI Ö®Óαê (CURSOR)

 Óαê(CURSOR),ºÜÖØÒª
Óαê:ÓÃÓÚ´¦Àí¶àÐмǼµÄÊÂÎñ
ÓαêÊÇÒ»¸öÖ¸ÏòÉÏÏÂÎĵľä±ú(handle)»òÖ¸Õë,¼òµ¥Ëµ£¬Óαê¾ÍÊÇÒ»¸öÖ¸Õë
1 ´¦ÀíÏÔʽÓαê
  ÏÔʽÓα괦ÀíÐè 4¸ö PL/SQL ²½Öè,ÏÔʾÓαêÖ÷ÒªÓÃÓÚ´¦Àí²éѯÓï¾ä
  (1) ¶¨ÒåÓαê
  ¸ñʽ:  CURSOR cursor_name [(partment[,parameter]...)] IS s ......

ORACLE 10G PL/SQL PACKAGEѧϰ±Ê¼Ç


DBMS_CHANGE_NOTIFICATION
¶ÔÏó£¨±í£©Êý¾Ý¸üÐÂ֪ͨ
DBMS_APPLICATION_INFO
ÉèÖÃ/¶ÁÈ¡SESSION APPLICATIONÐÅÏ¢£¬²Ù×÷V$SESSION_LONGOPS
DBMS_ALERT
¸æ¾¯
DBMS_DATAPUMP
Êý¾ÝÇ¨ÒÆ
DBMS_DB_VERSION
Êý¾Ý¿â°æ±¾¶¨Òå
DBMS_DDL
Compiles¡¢wrapped¡¢Reorganizes ¶ÔÏó
DBMS_DEBUG
ORACLE DEPL/SQL debugger ¹¤¾ß
DB ......

OracleÖеÄNullÖµ½âÎö

         ÓÐÈË×ܽáÁËÊý¾Ý¿âÖÐNullÖµµÄ¸ÅÄ±È½Ï¾«Á¶£¬ÕªÂ¼ÈçÏ£º
NullÊÇÊý¾Ý¿âÖÐÌØÓеÄÊý¾ÝÀàÐÍ£¬µ±Ò»Ìõ¼Ç¼µÄij¸öÁÐΪNull£¬Ôò±íʾÕâ¸öÁеÄÖµÊÇδ֪µÄ¡¢ÊDz»È·¶¨µÄ¡£¼ÈÈ»ÊÇδ֪µÄ£¬¾ÍÓÐÎÞÊýÖֵĿÉÄÜÐÔ¡£Òò´Ë£¬Null²¢²»ÊÇÒ»¸öÈ·¶¨µÄÖµ¡£
ÕâÊÇNullµÄÓÉÀ´¡¢Ò²ÊÇNullµÄ»ù´¡£¬ËùÓк ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ