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

[תÔØ]Oracle´æ´¢¹ý³Ìѧϰ

´æ´¢¹ý³Ì´´½¨Óï·¨£º
create or replace procedure ´æ´¢¹ý³ÌÃû£¨param1 in type£¬param2 out type£© 
as
±äÁ¿1 ÀàÐÍ£¨Öµ·¶Î§£©;
±äÁ¿2 ÀàÐÍ£¨Öµ·¶Î§£©;
Begin
    Select count(*) into ±äÁ¿1 from ±íA whereÁÐÃû=param1£»
    If (ÅжÏÌõ¼þ) then
       Select ÁÐÃû into ±äÁ¿2 from ±íA whereÁÐÃû=param1£»
       Dbms_output¡£Put_line(‘´òÓ¡ÐÅÏ¢’);
    Elsif (ÅжÏÌõ¼þ) then
       Dbms_output¡£Put_line(‘´òÓ¡ÐÅÏ¢’);
    Else
       Raise Òì³£Ãû£¨NO_DATA_FOUND£©;
    End if;
Exception
    When others then
       Rollback;
End;
 
×¢ÒâÊÂÏ
1£¬  ´æ´¢¹ý³Ì²ÎÊý²»´øÈ¡Öµ·¶Î§£¬in±íʾ´«È룬out±íʾÊä³ö
2£¬  ±äÁ¿´øÈ¡Öµ·¶Î§£¬ºóÃæ½Ó·ÖºÅ
3£¬  ÔÚÅжÏÓï¾äÇ°×îºÃÏÈÓÃcount£¨*£©º¯ÊýÅжÏÊÇ·ñ´æÔÚ¸ÃÌõ²Ù×÷¼Ç¼
4£¬  ÓÃselect ¡£¡£¡£into¡£¡£¡£¸ø±äÁ¿¸³Öµ
5£¬  ÔÚ´úÂëÖÐÅ×Òì³£Óà raise+Òì³£Ãû
 
 
ÒÔÃüÃûµÄÒì³£
ÃüÃûµÄϵͳÒì³£                             ²úÉúÔ­Òò
ACCESS_INTO_NULL                  Î´¶¨Òå¶ÔÏó
CASE_NOT_FOUND                    CASE ÖÐÈôδ°üº¬ÏàÓ¦µÄ WHEN £¬²¢ÇÒûÓÐÉèÖÃ
ELSE ʱ
COLLECTION_IS_NULL               ¼¯ºÏÔªËØδ³õʼ»¯
CURSER_ALREADY_OPEN            ÓαêÒѾ­´ò¿ª
DUP_VAL_ON_INDEX                  ΨһË÷Òý¶ÔÓ¦µÄÁÐÉÏÓÐÖظ´µÄÖµ
INVALID_CURSOR  


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

oracle½¨Á¢±í¿Õ¼ä

1.oralceɾ³ýÃüÁî
1.1.ɾ³ýÓû§
drop user username cascade;
1.2.ɾ³ý±í¿Õ¼ä
DROP TABLESPACE dataspace INCLUDING CONTENTS AND DATAFILES;
2.´´½¨±í¿Õ¼ä
2.1.½¨Á¢±í¿Õ¼ä
CREATE TABLESPACE dataspace
DATAFILE '/Ŀ¼/dataspace.dbf' SIZE 500M
UNIFORM SIZE 128k; //Ö¸¶¨Çø³ß´çΪ128k,Èç²»Ö¸¶¨£¬Çø³ß´çĬÈÏÎ ......

ORACLE ÏëÇå³þÁËÔÙ×ö£¬Òª½÷É÷Щ¡¡ÐÖµÜ

 ÐÇÆÚÒ» ·¢ÏÖÒ»¸ö±íÓкܶàÖظ´Êý¾Ý Ëæ»úʹÓÃɾ³ýÖظ´Êý¾ÝµÄÓï¾ä¡£
ÐÇÆÚ¶þ ·¢ÏÖ ÕâÓï¾äÅÜÁ˺ܾö¼Ã»ÅÜÍ꣬13¸öСʱÁË£¡Ö»²»¹ýɾ³ý10¸öÔµÄÊý¾Ý¶øÒÑ
ÒÀÈ»¶ÏÁËËü£¬¿ÉËü»Ø¹ö»¨ÁË4¸öСʱ£¬ÉÏÎçÓ°ÏìÁËÊý¾Ý¿âµÄ·þÎñËÙ¶ÈÁË¡£
È»ºóÒ»¸öÔÂÒ»¸öÔ¼ì²éÖظ´Êý¾ÝµÄ·¶Î§£¬×îºó¶¨Î»µ½9Ôµ½10Ô¡£É¾³ýËü£¬ÓÃÄÇÌõÓï¾äºÜÂý£¬Ò»¸öСʱºó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ