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;
Ïà¹ØÎĵµ£º
Ò»£®Ïà¹ØµÄ¸ÅÄî
RowidµÄ¸ÅÄrowidÊÇÒ»¸öαÁУ¬¼ÈÈ»ÊÇαÁУ¬ÄÇôÕâ¸öÁоͲ»ÊÇÓû§¶¨Ò壬¶øÊÇϵͳ×Ô¼º¸ø¼ÓÉϵġ£¶Ôÿ¸ö±í¶¼ÓÐÒ»¸örowidµÄαÁУ¬µ«ÊÇ
±íÖв¢²»ÎïÀí´æ´¢ROWIDÁеÄÖµ¡£²»¹ýÄã¿ÉÒÔÏñʹÓÃÆäËüÁÐÄÇÑùʹÓÃËü£¬µ«ÊDz»ÄÜɾ³ý¸ÄÁУ¬Ò²²»ÄܶԸÃÁеÄÖµ½øÐÐÐ޸ġ¢²åÈë¡£Ò»µ©Ò»ÐÐÊý¾Ý²åÈëÊý¾Ý¿â£¬Ôò
rowidÔÚ¸ÃÐ ......
--Ãû´Ê˵Ã÷£ºÔ´——±»Í¬²½µÄÊý¾Ý¿â
Ä¿µÄ——Ҫͬ²½µ½µÄÊý¾Ý¿â
Ç°6²½±ØÐëÖ´ÐÐ,µÚ6ÒÔºóÊÇһЩ¸¨ÖúÐÅÏ¢.
--1¡¢ÔÚÄ¿µÄÊý¾Ý¿âÉÏ£¬´´½¨dblink
drop public database link dblink_orc92_182;
Create public DATABASE LINK dbl ......
Oracle Êý¾ÝÀàÐͼ°´æ´¢·½Ê½
Ô¬¹â¶« Ô´´
¸ÅÊö
ͨ¹ýʵÀý£¬È«Ãæ¶øÉîÈëµÄ·ÖÎöoralceµÄ»ù±¾Êý¾ÝÀàÐͼ°ËüÃǵĴ洢·½Ê½¡£ÒÔORACLE 10GΪ»ù´¡£¬½éÉÜoralce 10gÒýÈëµÄеÄÊý¾ÝÀàÐÍ¡£ÈÃÄã¶ÔoracleÊý¾ÝÀàÐÍÓÐÒ»¸öȫеÄÈÏʶ¡£½ÒʾһЩ²»ÎªÈËÖªµÄÃØÃܺͱ»ºöÂÔµÄäµã¡£´ÓʵÓúÍÓÅ»¯µÄ½Ç¶È³ö·¢£¬ÌÖÂÛÿÖÖÊý¾ÝÀàÐ͵ÄÌص㡣´ÓÕ ......
°²×°Oracleºó£¬¸ü¸ÄWindows¼ÆËã»úÃû£¬µ¼Ö²¿·ÖOracleµÚÈý·½¹¤¾ß£¬Èç:PLSQL
DeveloperÎÞ·¨µÇ½£¬²¢ÌáʾORA-12541:TNS:no listener»òORA-12547:TNS:¶ªÊ§ÁªÏµµÈ´íÎóÐÅÏ¢µÄ½â¾ö·½·¨¡£
´ð£º´ÓOracleµÄ´íÎóÌáʾÀ´¿´,ÊÇ˵TNS:no listener
£¬¹À¼ÆÊÇijÖÖ·þÎñûÓÐÆô¶¯£¬´ò¿ªwindows¹ÜÀí¹¤¾ß->·þÎñ£¬Ò»¿´£¬ÓÐÒ»¸öOracle ......
µÚÒ»¿Î£º¿Í»§¶Ë
1. Sql Plus(¿Í»§¶Ë£©£¬ÃüÁîÐÐÖ±½ÓÊäÈ룺sqlplus£¬È»ºó°´ÌáʾÊäÈëÓû§Ãû£¬ÃÜÂë¡£
2. ´Ó¿ªÊ¼³ÌÐòÔËÐÐ:sqlplus£¬ÊÇͼÐΰæµÄsqlplus.
3. http://localhost:5560/ ......