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

Oracle Òì³£

OracleÒì³£·ÖΪ3ÖÖ:
(1)Ô¤¶¨ÒåÒì³£:no_data_foundµÈ,ÊÇOracleϵͳ¶¨ÒåµÄÒì³£.
declare
  s_test varchar2
begin
  select id into s_test from test; --´Ëʱtest±íÎÞÊý¾Ý
exception
  when no_data_found then
    raise_application_error(-20001, 'ûÓÐÊý¾Ý');
end;
(2)×Ô¶¨ÒåÒì³£:×Ô¼º¶¨ÒåµÄÒì³£,×Ô¼ºÅ×,×Ô¼º²¶»ñ.
declare
  exp_test exception;
begin
  if 1 = 1 then
    raise exp_test;
  end if;
exception
  when exp_test then
    raise_application_error(-20002, '×Ô¶¨ÒåÒì³£');
end;
(3)·ÇÔ¤¶¨ÒåÒì³£.
--Õâ¸öÀý×ӾͲ»ÐèÒª×Ô¼ºÅ×,ÒòΪÒѾ­°ÑÖ÷¼ü³åÍ»µÄÒì³£¸ø¸²¸ÇÁË,ËùÒÔÖ»ÒªÊÇÖ÷¼ü³åÍ»,ÄÇô¾ÍÊÇexp_testÀ´´úÌæÒÔǰÄǸöÁË.
declare
  exp_test exception;
  progam exception_init(exp_test ,-1); --¸²¸Ç-1Õâ¸öÒì³£,-1´ú±íÖ÷¼ü³åÍ»
begin
  insert into test values('1');   --test±íµÄÖ÷¼ü´æÔÚ1Õâ¸öÖµ.
exception
  when exp_test then
    raise_application_error(-20003, 'Ö÷¼ü³åÍ»');
end;
ÅжϲÎÊýµÄ.
create or replace procedure addContent_test
(
  s_type in varchar2,
  s_count in number,
  s_language in varchar2
)
is
  exp_type exception;
  exp_count exception;
  exp_language exception;
begin
  if s_type <> 50
  and s_type <> 51
  and s_type <> 52
  and s_type <> 53
  and s_type <> 54
  and s_type <> 55
  and s_type <> 56
  and s_type <> 57
  and s_type <> 0
  and s_type <> 2
  and s_type <> 3
  and s_type <> 99999999 then
    raise exp_type;
  end if;
 
  if s_count < 1 or s_count > 100 then
    raise exp_count;
  end if;
  dbms_output.put_line(to_number(instr(s_language, ',',1,2)));
  if instr(s_language, ',',1,2) > 0 then
    raise exp_language;
  end if;
 
exception


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

jdbcÁ¬½ÓOracle

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

Oracle 10g ĬÈϰ²×°´øÀ´µÄÓû§Ãû/ÃÜÂë


Oracle 10g ĬÈϰ²×°´øÀ´µÄÓû§Ãû/ÃÜÂë
 
Username
Password
Description
See Also
CTXSYS
CTXSYS
The Oracle Text account
Oracle Text Reference
DBSNMP
DBSNMP
The account used by the Management Agent component of Oracle Enterprise Manager to monitor and manage the database
Oracle Enter ......

OracleÈÕÆÚº¯Êý¼¯½õ

OracleÈÕÆÚº¯Êý¼¯½õ(Ò»)
Ò»¡¢ ³£ÓÃÈÕÆÚÊý¾Ý¸ñʽ
1.Y»òYY»òYYY ÄêµÄ×îºóһ룬Á½Î»»òÈýλ
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_ch ......

ORACLE ÆÕͨ±íת»»³É·ÖÇø±í£¨ÔÚÏßÖØ¶¨Ò壩


ÔÚÒ»¸ö¸ß¿ÉÓÃϵͳÖУ¬Èç¹ûÐèÒª¸Ä±äÒ»¸ö±íµÄ¶¨ÒåÊÇÒ»¼þ±È½Ï¼¬ÊÖµÄÎÊÌ⣬ÓÈÆäÊǶÔ
ÓÚ7×24ϵͳ¡£OracleÌṩµÄ»ù±¾Óï·¨»ù±¾¿ÉÒÔÂú×ãÒ»°ãÐÔÐ޸쬵«ÊǶÔÓÚ°ÑÆÕͨ¶Ñ±í¸ÄΪ·ÖÇø±í£¬°ÑË÷Òý×éÖ¯±íÐÞ¸ÄΪ¶Ñ±íµÈ²Ù×÷¾ÍÎÞ·¨Íê³ÉÁË¡£¶øÇÒ£¬
¶ÔÓÚ±»´óÁ¿DMLÓï¾ä·ÃÎÊµÄ±í£¬ÐÒÔ˵ÄÊÇ£¬Oracle´Ó9i°æ±¾¿ªÊ¼ÌṩÁËÔÚÏßÖØ¶¨Òå±í¹¦ÄÜ£¬Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ