Oracle´æ´¢¹ý³ÌÓ﷨ѧϰ
´æ´¢¹ý³Ì´´½¨Óï·¨£º
£¨1£©ÎÞ²Î
create or replace procedure ´æ´¢¹ý³ÌÃû
as
±äÁ¿1 ÀàÐÍ£¨Öµ·¶Î§£©;
±äÁ¿2 ÀàÐÍ£¨Öµ·¶Î§£©;
Begin
........................
Exception
........................
End;
£¨2£©´ø²Î
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_IN
Ïà¹ØÎĵµ£º
ÔÎĵØÖ·£ºhttp://arvinnan.javaeye.com/blog/308638
²Î¿¼
http://www.blogjava.net/wxqxs/archive/2008/10/13/237180.html?opt=admin
http://hi.baidu.com/ray315/blog/item/153c97a33cd26caacbefd0de.html
¶¨Òå
External tables access data in
external s ......
1.Ê×ÏÈ˵Ã÷һϣº
ÔÒòÊÇÒòΪÎÒÔÚ×öÕâ¸öÏîĿʱ£¬±»ÏÞÖƵÃÌ«¶à£¬weblogicºÍoracleµÄ°æ±¾²»Äܱ䣬ҪʹÓÃÔÀ´µÄ°æ±¾¡£
Òò´ËÄØ¡£²Ù×÷ÆðÀ´±È½ÏÂé·³¡£¶øÇÒ²»Äܸü¸ÄÔ±¾¹¤³ÌÀïÃæµÄJar°ü£¨ËüÀïÃæ´æÔÚÁËoracle14.jar°ü£¬µ«±È½Ï¾É£©
weblogic°æ±¾Îª£º8.14
oracle°æ±¾Îª£º9i
2.ÔÚÕâÀïÄØ£¬Ê¹ÓÃhibernate£¬ÒÔÁ÷µÄÐÎʽ¶ÁÈ¡µ½Êý¾ÝÀïÃæ ......
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE hibernate-configuration (View Source for full doctype...)>
- <!-- Generated by MyEclipse Hibernate Tools.
--> - <!-- ÒÔÉϼ¸ÐÐËùÓеÄhibernate.cfg.xml¶¼Ïàͬ
--> [url=file:///C:/Documents%20and%20Settings/ ......
OracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°ÑdmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл·¾³£º¿ÉÒÔÔÚSQLPLUS.EXE»òÕßDOS£¨ÃüÁîÐУ©ÖÐÖ´Ð ......
PL/SQL µÄÒì³£(Ô¤¶¨ÒåÒì³£)
2009-08-13 20:24
Òì³£Ãû³Æ & ......