Oracle ´æ´¢¹ý³ÌÖÐʹÓÃcursor Óαê±éÀúÊý¾Ý
Ïȶ¨ÒåÒ»¸öcursor:
Procedure P_MYPROC (
PI_PARAM VARCHAR2
)IS
VI_A VARCHAR2(10):='';
VI_B VARCHAR2(20):='';
VI_C VARCHAR2(30):='';
--¶¨Òå
CURSOR MYCUR IS
SELECE T.A ,T.B, T.C
from TBL_MYTABLE T;
BEGIN
--´ò¿ª
OPEN MYCUR;
--±éÀú
LOOP
FETCH MYCUR
INTO VI_A,VI_B,VI_C;
--ÎÞÊý¾ÝʱÍ˳ö
EXIT WHEN MYCUR%NOTFOUND;
--DO SOMETHING HERE;
END LOOP;
END P_MYPROC;
Ïà¹ØÎĵµ£º
½ñÌì°²×°Èí¼þÒ»Ö±ÔÚ²âÊÔÁ´½Ó²»ÄÜͨ¹ý£¬³öÏÖORA-12154: TNS: could not resolve service name£¬ºóÀ´²Å·¢ÏÖÊÇtnsnames.oraÖÐÓÐÎó¡£²éÕÒÍøÉϵÄ×ÊÁÏ£¬¼Ç¼ÏÂÀ´¡£
ÒªÅųý¿Í»§¶ËÓë·þÎñÆ÷¶ËµÄÁ¬½ÓÎÊÌ⣬Ê×Ïȼì²é¿Í»§¶ËÅäÖÃÊÇ·ñÕýÈ·(¿Í»§¶ËÅäÖñØÐëÓëÊý¾Ý¿â·þÎñÆ÷¶Ë¼àÌýÅäÖÃÒ»ÖÂ)£¬ÔÙ¸ù¾Ý´íÎóÌáʾ½â¾ö¡£ÏÂÃæÁгö¼¸ÖÖ³£¼ûµÄÁ¬½ÓÎÊÌâ ......
ÒòΪÏîĿijЩģ¿éµÄÊý¾Ý½á¹¹Éè¼ÆûÓÐÑϸñ°´ÕÕij¹æ·¶Éè¼Æ£¬ËùÒÔÖ»ÄÜ´ÓÊý¾Ý¿âÖвéѯÊý¾Ý½á¹¹£¬ÐèÒª²éѯµÄÐÅÏ¢ÈçÏ£º×Ö¶ÎÃû³Æ¡¢Êý¾ÝÀàÐÍ¡¢ÊÇ·ñΪ¿Õ¡¢Ä¬ÈÏÖµ¡¢Ö÷¼ü¡¢Íâ¼üµÈµÈ¡£
ÔÚÍøÉÏËÑË÷Á˲éѯÉÏÊöÐÅÏ¢µÄ·½·¨£¬×ܽáÈçÏ£º
Ò»£¬²éѯ±í»ù±¾ÐÅÏ¢
select
utc.column_name,utc.data_type,utc.data_le ......
About parent vs child latches. There is no fundamental low level difference between parent and child latches, they are all small regions of memory modified with atomic test-and-set style opcodes.
You see parent (and solitary) latches from x$ksll ......
Õâ¸öOracleµÄ·ÖÒ³ÏÔʾ¾Ý˵ÊÇ×îÂé·³µÄ£¨MySQL×î¼òµ¥£©£¬µ«ÊÇÕâ¸ö·ÖÒ³ÏÔʾºÜÓÐÓá£ÏÖÔںܶàÍøÕ¾ÉϵÄÌõÄ¿¶¼·Ç³£¶à£¬ÀýÈçÐÂÎÅ£¬¿ÉÄܾ͸ոüеľÍÓÐÉÏ°ÙÌõ£¬ÔÙ¼ÓÉÏÒÔÇ°µÄ£¬Ò»ÕÅÒ³Ãæ¿Ï¶¨¾ÍÊǷŲ»ÏÂÁË£¬ËùÒÔ·ÖÒ³µÄºÃ´¦¾ÍÊÇ¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£
ÏÂÃæÒ»ÅÅÅŵĽÐÄãÑ¡ÔñµÚ¼¸Ò³£¬Ò»Ñ¡Ôñ£¬Ö±½Ó¾ÍÌøµ½ºóÃæµÄ¼¸Ò³È¥ÁË£¬²»ÓÃÕâÑù´ÓÉÏÒ ......
select d.code,d.name, sum(w.weight) weight,round(avg(w.price),2) price,sum(w.money) money
from weight_info w left outer join t_dict d on w.productcode=d.code left outer join t_balancecode b on w.balancecode=b.balancecode where 1=1 and w.operdate>TO_TIMESTAMP('2009-11-2 04:12:32.0', ' ......