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

Oracle´æ´¢¹ý³Ì×ܽá(Ò»¡¢»ù±¾Ó¦ÓÃ)

1¡¢´´½¨´æ´¢¹ý³Ì
create or replace procedure test(var_name_1 in type,var_name_2 out type) as
--ÉùÃ÷±äÁ¿(±äÁ¿Ãû ±äÁ¿ÀàÐÍ)
begin
--´æ´¢¹ý³ÌµÄÖ´ÐÐÌå
end test;
´òÓ¡³öÊäÈëµÄʱ¼äÐÅÏ¢
E.g:
create or replace procedure test(workDate in Date) is
begin
dbms_output.putline('The input date is:'||to_date(workDate,'yyyy-mm-dd'));
end test;
2¡¢±äÁ¿¸³Öµ
±äÁ¿Ãû := Öµ;
E.g£º
create or replace procedure test(workDate in Date) is
x number(4,2);
 begin
 x := 1;
end test;
3¡¢ÅжÏÓï¾ä:
if ±È½Ïʽ then begin end; end if;
E.g
create or replace procedure test(x in number) is
begin
        if x >0 then
         begin
        x := 0 - x;
        end;
    end if;
    if x = 0 then
       begin
        x: = 1;
    end;
    end if;
end test;
4¡¢For Ñ­»·
For ... in ... LOOP
--Ö´ÐÐÓï¾ä
end LOOP;
(1)Ñ­»·±éÀúÓαê
create or replace procedure test() as
Cursor cursor is select name from student; name varchar(20);
begin
for name in cursor LOOP
begin
 dbms_output.putline(name); 
end;
end LOOP;
end test;
(2)Ñ­»·±éÀúÊý×é
 create or replace procedure test(varArray in myPackage.TestArray) as
--(ÊäÈë²ÎÊývarArray ÊÇ×Ô¶¨ÒåµÄÊý×éÀàÐÍ£¬¶¨Ò巽ʽ¼û±êÌâ6)
i number;
begin
i := 1;  --´æ´¢¹ý³ÌÊý×éÊÇÆðʼλÖÃÊÇ´Ó1¿ªÊ¼µÄ£¬Óëjava¡¢C¡¢C++µÈÓïÑÔ²»Í¬¡£ÒòΪÔÚOracleÖб¾ÊÇûÓÐÊý×éµÄ¸ÅÄîµÄ£¬Êý×éÆäʵ¾ÍÊÇÒ»ÕÅ
--±í(Table),ÿ¸öÊý×éÔªËؾÍÊDZíÖеÄÒ»¸ö¼Ç¼£¬ËùÒÔ±éÀúÊý×éʱ¾ÍÏ൱ÓÚ´Ó±íÖеĵÚÒ»Ìõ¼Ç¼¿ªÊ¼±éÀú
for i in 1..varArray.count LOOP     
dbms_output.putline('The No.'|| i || 'record in varArray is:'||varArray(i));  
 end LOOP;
end test;
5¡¢While Ñ­»·
whi


Ïà¹ØÎĵµ£º

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

Oracle ÈÕÖ¾Îļþ´íÎóµÄ´¦Àí¡£

ת×Ô£ºhttp://hi.baidu.com/dashuaiwang/blog/item/47cc680ec35055c37acbe1f8.html
´ò¿ªoracle Êý¾Ý¿âʱ³öÏÖÁË´íÎó:
ORA-00313: ÎÞ·¨´ò¿ªÈÕÖ¾×é 1 (Ïß³Ì 1) µÄ³ÉÔ±
ORA-00312: Áª»úÈÕÖ¾ 1 Ïß³Ì 1: 'D:\ORACLE\ORADATA\GOCOM\REDO01.LOG'
SQL> connect / as sysdba;
ÒÑÁ¬½Ó¡£
SQL> shutdown immediate;
ORA- ......

Oracle DBAʵս°à


¿Î³Ì¸ÅÒª
¿Î³Ì±àºÅ
£ºXY-DB-V01
 
ÅàÑøÄ¿±ê
£º¾ß±¸Êµ¼Ê²Ù×÷ÄÜÁ¦µÄ Oracle Êý¾Ý¿â¹ÜÀíÔ±
רעOracleʵսÄÜÁ¦µÄÇ¿»¯£¬ÍêÈ«¸²¸ÇOCP¿Î³ÌÄÚÈÝ£¬¾ßÓиü´óµÄѧϰǿ¶ÈºÍ¸ü³¤µÄѧϰʱ¼ä¡£
 
ÈëѧÌõ¼þ
£º¶ÔOracle»òÆäËü¹ØϵÊý¾Ý¿âÓÐÒ»¶¨µÄ»ù´¡Õß
 
°à±ð¼°ÊÚ¿Îʱ¼ä
£ºÍѲú°àÀúʱ1¸öÔ£¬1 ......

Oracle 10g ÖÐÎÄÂÒÂëÎÊÌâ

ÎÊÌ⣺Êý¾Ý¿âΪ£ºOracle Database 10g Release 2
¡¡¡¡²Ù×÷ϵͳΪ£ºWindows Vista/Windows XP MCE(Á½¸ö²Ù×÷ϵͳ·Ö±ð°²×°ºó³öÏÖÏàͬÎÊÌâ)
¡¡¡¡Êý¾Ý¿â°²×°ºó(һ·ĬÈÏÖµ)£¬³¢ÊÔInsertÊý¾ÝºóSelect³öÀ´£¬Ô­À´µÄÖÐÎÄ×Ö¶ÎÖµ±ä³ÉÁË??????ÐÎʽµÄÂÒÂ룬¸ÃÈçºÎ½â¾ö£¿
¡¡¡¡ÔÚÍøÉϲéÁËһЩ×ÊÁÏ£¬ËµÊÇ·þÎñÆ÷Óë¿Í»§¶Ë×Ö·û¼¯²»Æ¥Å䣬µ«Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ