`
binyan17
  • 浏览: 205564 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

【转】ORACLE Exception 异常对照

阅读更多

没有数据搜索到  =  NO_DATA_FOUND  
违反唯一性约束  =  DUP_VAL_ON_INDEX   
---------------------------------------------------------------  
 ORACLE <wbr>Exception <wbr>异常对照ORACLE <wbr>Exception <wbr>异常对照
Exception  Oracle  Error  SQLCODE  Value    
ACCESS_INTO_NULL  
 ORA-06530  
 -6530  
   
CASE_NOT_FOUND  
 ORA-06592  
 -6592  
   
COLLECTION_IS_NULL  
 ORA-06531  
 -6531  
   
CURSOR_ALREADY_OPEN  
 ORA-06511  
 -6511  
   
DUP_VAL_ON_INDEX  
 ORA-00001  
 -1  
   
INVALID_CURSOR  
 ORA-01001  
 -1001  
   
INVALID_NUMBER  
 ORA-01722  
 -1722  
   
LOGIN_DENIED  
 ORA-01017  
 -1017  
   
NO_DATA_FOUND  
 ORA-01403  
 +100  
   
NOT_LOGGED_ON  
 ORA-01012  
 -1012  
   
PROGRAM_ERROR  
 ORA-06501  
 -6501  
   
ROWTYPE_MISMATCH  
 ORA-06504  
 -6504  
   
SELF_IS_NULL  
 ORA-30625  
 -30625  
   
STORAGE_ERROR  
 ORA-06500  
 -6500  
   
SUBSCRIPT_BEYOND_COUNT  
 ORA-06533  
 -6533  
   
SUBSCRIPT_OUTSIDE_LIMIT  
 ORA-06532  
 -6532  
   
SYS_INVALID_ROWID  
 ORA-01410  
 -1410  
   
TIMEOUT_ON_RESOURCE  
 ORA-00051  
 -51  
   
TOO_MANY_ROWS  
 ORA-01422  
 -1422  
   
VALUE_ERROR  
 ORA-06502  
 -6502  
   
ZERO_DIVIDE  
 ORA-01476  
 -1476  
   
 
Brief  descriptions  of  the  predefined  exceptions  follow:  
 
Exception  Raised  when  ...    
ACCESS_INTO_NULL  
 Your  program  attempts  to  assign  values  to  the  attributes  of  an  uninitialized  (atomically  null)  object.  
   
CASE_NOT_FOUND  
 None  of  the  choices  in  the  WHEN  clauses  of  a  CASE  statement  is  selected,  and  there  is  no  ELSE  clause.  
   
COLLECTION_IS_NULL  
 Your  program  attempts  to  apply  collection  methods  other  than  EXISTS  to  an  uninitialized  (atomically  null)  nested  table  or  varray,  or  the  program  attempts  to  assign  values  to  the  elements  of  an  uninitialized  nested  table  or  varray.  
   
CURSOR_ALREADY_OPEN  
 Your  program  attempts  to  open  an  already  open  cursor.  A  cursor  must  be  closed  before  it  can  be  reopened.  A  cursor  FOR  loop  automatically  opens  the  cursor  to  which  it  refers.  So,  your  program  cannot  open  that  cursor  inside  the  loop.  
   
DUP_VAL_ON_INDEX  
 Your  program  attempts  to  store  duplicate  values  in  a  database  column  that  is  constrained  by  a  unique  index.  
   
INVALID_CURSOR  
 Your  program  attempts  an  illegal  cursor  operation  such  as  closing  an  unopened  cursor.  
   
INVALID_NUMBER  
 In  a  SQL  statement,  the  conversion  of  a  character  string  into  a  number  fails  because  the  string  does  not  represent  a  valid  number.  (In  procedural  statements,  VALUE_ERROR  is  raised.)  This  exception  is  also  raised  when  the  LIMIT-clause  expression  in  a  bulk  FETCH  statement  does  not  evaluate  to  a  positive  number.  
   
LOGIN_DENIED  
 Your  program  attempts  to  log  on  to  Oracle  with  an  invalid  username  and/or  password.  
   
NO_DATA_FOUND  
 A  SELECT  INTO  statement  returns  no  rows,  or  your  program  references  a  deleted  element  in  a  nested  table  or  an  uninitialized  element  in  an  index-by  table.  SQL  aggregate  functions  such  as  AVG  and  SUM  always  return  a  value  or  a  null.  So,  a  SELECT  INTO  statement  that  calls  an  aggregate  function  never  raises  NO_DATA_FOUND.  The  FETCH  statement  is  expected  to  return  no  rows  eventually,  so  when  that  happens,  no  exception  is  raised.  
   
NOT_LOGGED_ON  
 Your  program  issues  a  database  call  without  being  connected  to  Oracle.  
   
PROGRAM_ERROR  
 PL/SQL  has  an  internal  problem.  
   
ROWTYPE_MISMATCH  
 The  host  cursor  variable  and  PL/SQL  cursor  variable  involved  in  an  assignment  have  incompatible  return  types.  For  example,  when  an  open  host  cursor  variable  is  passed  to  a  stored  subprogram,  the  return  types  of  the  actual  and  formal  parameters  must  be  compatible.  
   
SELF_IS_NULL  
 Your  program  attempts  to  call  a  MEMBER  method  on  a  null  instance.  That  is,  the  built-in  parameter  SELF  (which  is  always  the  first  parameter  passed  to  a  MEMBER  method)  is  null.  
   
STORAGE_ERROR  
 PL/SQL  runs  out  of  memory  or  memory  has  been  corrupted.  
   
SUBSCRIPT_BEYOND_COUNT  
 Your  program  references  a  nested  table  or  varray  element  using  an  index  number  larger  than  the  number  of  elements  in  the  collection.  
   
SUBSCRIPT_OUTSIDE_LIMIT  
 Your  program  references  a  nested  table  or  varray  element  using  an  index  number  (-1  for  example)  that  is  outside  the  legal  range.  
   
SYS_INVALID_ROWID  
 The  conversion  of  a  character  string  into  a  universal  rowid  fails  because  the  character  string  does  not  represent  a  valid  rowid.  
   
TIMEOUT_ON_RESOURCE  
 A  time-out  occurs  while  Oracle  is  waiting  for  a  resource.  
   
TOO_MANY_ROWS  
 A  SELECT  INTO  statement  returns  more  than  one  row.  
   
VALUE_ERROR  
 An  arithmetic,  conversion,  truncation,  or  size-constraint  error  occurs.  For  example,  when  your  program  selects  a  column  value  into  a  character  variable,  if  the  value  is  longer  than  the  declared  length  of  the  variable,  PL/SQL  aborts  the  assignment  and  raises  VALUE_ERROR.  In  procedural  statements,  VALUE_ERROR  is  raised  if  the  conversion  of  a  character  string  into  a  number  fails.  (In  SQL  statements,  INVALID_NUMBER  is  raised.)  
   
ZERO_DIVIDE  
 Your  program  attempts  to  divide  a  number  by  zero.  

分享到:
评论

相关推荐

    oralce异常信息对照表

    "oralce异常信息对照表" 提供了一个有价值的资源,帮助开发者和DBA理解并解决Oracle数据库中遇到的各种异常。这个对照表通常包含了异常代码、异常名称、异常描述以及可能的解决方案。 Oracle异常主要分为预定义异常...

    oracle转DB2 对照

    ### Oracle转DB2对照知识点详解 #### 1. Oracle SQL PL 和 DB2 inline SQL PL (内嵌) 比较 ##### 1.1 创建存储过程 - **Oracle**: 支持 `CREATE OR REPLACE` 语法,允许在已有存储过程的基础上进行替换。 ```sql ...

    ORACLE转DB2对照全解

    ### ORACLE转DB2对照全解 #### 一、Oracle SQL PL与DB2 inline SQL PL对比 本章节主要介绍Oracle SQL PL与DB2 inline SQL PL之间的对比,包括但不限于存储过程、触发器、用户定义函数(UDF)、条件语句及流程控制...

    编程术语英汉对照

    8. **异常处理(Exception Handling)**:当程序运行时遇到错误或异常情况,可以使用try...catch语句捕获并处理异常,防止程序崩溃。 9. **数据库(Database)**:用于存储和管理数据的系统,如MySQL、Oracle和...

    pl/sql 知识库

    它由三部分组成:声明部分(Declarations)、执行部分(Execution)和异常处理部分(Exception Handling)。声明部分用于定义变量、常量、游标等;执行部分包含SQL语句和流程控制结构,如循环、条件判断等;异常处理...

    JAVA 翻译文献 中英文全 翻译过来汉字超4000

    4. **异常处理(Exception Handling)**:JAVA通过try-catch-finally语句块进行异常处理,确保程序的健壮性。 5. **输入/输出(I/O)**:JAVA的I/O流系统支持文件操作、网络通信等。 6. **集合框架(Collections ...

Global site tag (gtag.js) - Google Analytics