oracleÓαêµÄʹÓÃ
CREATE OR REPLACE PROCEDURE PROC_T(
RESULT OUT NUMBER
)
IS
V_NAME emp%ROWTYPE;
CURSOR CUS_T IS SELECT * from EMP;
BEGIN
OPEN CUS_T;
loop
FETCH CUS_T INTO V_NAME;
exit when cus_t%notfound;
RESULT:=CUS_T%ROWCOUNT;
end loop;
CLOSE CUS_T;
END PROC_T;
Ïà¹ØÎĵµ£º
±¾ÎÄͨ¹ý¶ÔOracleÊý¾Ý¿âËø»úÖƵÄÑо¿£¬Ê×ÏȽéÉÜÁËOracleÊý¾Ý¿âËøµÄÖÖÀ࣬²¢ÃèÊöÁËʵ¼ÊÓ¦ÓÃÖÐÓöµ½µÄÓëËøÏà¹ØµÄÒì³£Çé¿ö£¬Ìرð¶Ô¾³£Óöµ½µÄÓÉÓڵȴýËø¶øʹÊÂÎñ±»¹ÒÆðµÄÎÊÌâ½øÐÐÁ˶¨Î»¼°½â¾ö£¬²¢¶ÔËÀËøÕâÒ»±È½ÏÑÏÖصÄÏÖÏó£¬Ìá³öÁËÏàÓ¦µÄ½â¾ö·½·¨ºÍ¾ßÌåµÄ·ÖÎö¹ý³Ì¡£
Êý¾Ý¿âÊÇÒ»¸ö¶àÓû§Ê¹ÓõĹ ......
ÖØ×°²Ù×÷ϵͳºó,Èç¹ûÊý¾ÝÎļþ,¿ØÖÆÎļþ,ÈÕÖ¾Îļþ¶¼ÍêºÃµÄ»°(ÔÚitpub¿´¹ýºÜ¶àÈËÌá¹ýÕâ¸ö»°Ìâ,¶àÊýÈ˶¼Êǽ«Õâ3¸öÎļþ·ÅÔÚͬһĿ¼oradata),Ö»ÐèÖØа²×°oracle(¸úÖØ×°²Ù×÷ϵͳǰͬ°æ±¾)µ½ÔĿ¼ºó,Öؽ¨ÊµÀý·þÎñºÍÃÜÂëÎļþ,ÅäÖÃÒ»ÏÂlistenerºÍtns¼´¿ÉÕý³£Æô¶¯Êý¾Ý¿â.
¹ý³ÌÈçÏÂ(¼ÙÉèÔʵÀýÃûΪorcl,°æ±¾Îª9i):
1.½«ÔÀ´µÄor ......
Access¡¢SQLServer¡¢Oracle³£¼ûSQLÓï¾äÓ¦ÓÃÇø±ð
¹Ø¾¢ËÉ PMP
Èç¹ûÒª¼æÈÝAccess¡¢SQL Server¡¢OracleÈý¸öÊý¾Ý¿â°æ±¾£»ÎÒÃÇÔÚ±àдSQLÓï¾äµÄ¹ý³ÌÖУ¬¾¡Á¿Ê¹ÓÃһЩͨÓõÄÓï¾ä£¬µ«»¹ÊÇÓÐЩ·½ÃæÓÐЩÇø±ð±ÜÃâ²»ÁË£¬ÏÖ¼òµ¥×ܽáһϡ£
ÒÔÏÂA´ú±íAccess,S´ú±íSQL Server,O´ú±íOracle
1¡¢È¡µ±Ç°ÏµÍ³Ê±¼ä
A:Select Now()
S:Selec ......
OracleÊý×éÒ»°ã¿ÉÒÔ·ÖΪ¹Ì¶¨Êý×éºÍ¿É±äÊý×é
¹Ì¶¨Êý×é
Sql´úÂë
declare
type v_ar is varray(10) of varchar2(30);
my_ar v_ar:=v_ar('g','m','d','¹¨','˧');
begin
for ......
ÓÃOracle²éѯÓï¾äÓ¦ÓþÑé×ܽá
¡¡ÒÔϵÄÎÄÕÂÖ÷ÒªÊǽéÉÜOracle²éѯÓï¾äµÄʵ¼ÊÓ¦ÓõľÑé×ܽᣬÄãÈç¹û¶ÔOracle²éѯÓï¾äµÄʵ¼ÊÓ¦ÓøÐÐËȤµÄ»°Äã¾Í¿ÉÒÔµã»÷ÒÔϵÄÎÄÕ½øÐйۿ´ÁË¡£ Ï£Íû»á¸øÄã´øÀ´Ò»Ð©°ïÖúÔÚ´Ë·½Ãæ¡£
¡¡¡¡1. select * from table_name where rownum>begin and rownum< end
¡¡¡¡2.sql = "select * fr ......