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

oracle, stored procedure, cursor

CREATE OR REPLACE PROCEDURE kevin_proc(x varchar) IS
a VARCHAR(20);
b VARCHAR(20);
CURSOR mycur(rn NUMBER) IS SELECT * from t_kevin_test WHERE ROWNUM<rn;
BEGIN
OPEN mycur(10);
LOOP FETCH mycur INTO a,b;
EXIT WHEN mycur%NOTFOUND;
Dbms_Output.put_line('a: '||a);
Dbms_Output.put_line('b: '||b);
END LOOP;
CLOSE mycur;
begin
dbms_output.put_line (x);
end;
END;


Ïà¹ØÎĵµ£º

ORACLEÊý¾Ý¿âÉè¼ÆÓëÓÅ»¯


<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 ......

Oracleº¯Êýmerge

°ÑÊý¾Ý´ÓÒ»¸ö±í¸´ÖƵ½ÁíÒ»¸ö±í£¬²åÈëÐÂÊý¾Ý»òÌæ»»µôÀÏÊý¾ÝÊÇÿһ¸öORACLE DBA¶¼»á¾­³£Åöµ½µÄÎÊÌâ¡£ÔÚORACLE9iÒÔǰµÄÄê´ú£¬ÎÒÃÇÒªÏȲéÕÒÊÇ·ñ´æÔÚÀÏÊý¾Ý£¬Èç¹ûÓÐÓÃUPDATEÌæ»»£¬·ñÔòÓÃINSERTÓï¾ä²åÈ룬Æä¼äÉÙ²»ÁË»¹ÓÐһЩ±ê¼Ç±äÁ¿µÈµÈ£¬·±ËöµÄºÜ¡£ÏÖÔÚORACLE9iרΪÕâÖÖÇé¿öÌṩÁËMERGEÓï¾ä£¬Ê¹ÕâÒ»¹¤×÷±äµÃÒì³£ÇáËÉ£¬
MERGEÓï ......

Oracle»ù´¡Óï¾ä


1¡¢ 
Á¬½ÓÊý¾Ý¿â
connect uuu/ooo
connect 
sys/ok as sysdba
2¡¢ 
´´½¨±í¿Õ¼ä
create tablespace stu(±í¿Õ¼äÃû
) datafile 

e:\stu.dbf

 size 100m autoextend on next 5m maxsize 500m;
3¡¢& ......

Oracle ¸ßËÙÅúÁ¿ËÙ²åÈëÊý¾Ý ½â¾ö·½°¸

×î½ü×ö¶ÌÐÅȺ·¢ÏîÄ¿ÓÐÒ»¸öÐèÇó,ÐèÒª¿Í»§´óÅúÁ¿(Ê®Íò¼¶)µ¼ÈëÊý¾Ý.
¿ªÊ¼ÊÇÓÃinsertµ¥ÌõÊý¾Ý,10ÍòÌõÊý¾ÝÒª20·ÖÖÓ
ºóÀ´·¢ÏÖ¿ÉÒÔÓÃinsert all Ò»ÌõsqlÒ»´Îµ¼Èë500Ìõ¼Ç¼,ÕâÑù10ÍòÌõÊý¾ÝÖ»ÓÃÁË1.5·ÖÖÓ,µ¼ÈëËÙ¶ÈÌá¸ßÁ˽üÀ´20±¶
ÏÂÃæ¾ÍʹÓÃinsert allµÄÐĵÃÌå»á¼Ç¼ÈçÏÂ.
ʹÓ÷½·¨:
insert all into table_name(col_1,col_2) v ......

oracle²»Óð²×°¿Í»§¶ËÒ²¿ÉÒÔÓÃplsqlÔ¶³ÌÁ¬½Ó

oracle²»Óð²×°¿Í»§¶ËÒ²¿ÉÒÔÓÃplsqlÔ¶³ÌÁ¬½Ó(ת£©
oracle²»Óð²×°¿Í»§¶ËÒ²¿ÉÒÔÓÃplsqlÔ¶³ÌÁ¬½Ó pl sqlÔ¶³ÌÁ¬½Ó
2008-01-14 14:33
oracle²»Óð²×°¿Í»§¶ËÒ²¿ÉÒÔÓÃplsqlÔ¶³ÌÁ¬½Ó
          ÿ´ÎÎÊÈ˼ң¬plsql ¿É²»¿ÉÒÔÖ±½ÓÔ¶³ÌÁ¬½Ó·þÎñÆ÷£¬ËûÃǶ¼ËµÒª°²×°¿Í»§¶Ë£¬¼ÇµÃÒÔÇ°Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ