Where can I find a complete list of predefined Oracle pl/SQL Exceptions?

前端 未结 4 2057
情歌与酒
情歌与酒 2021-01-31 09:52

Where can I find a full list of all predefined Oracle pl/SQL Exceptions?

In this link i found this list, are there anymore?

ACCESS_INTO_NULL    ORA-06530         


        
4条回答
  •  醉话见心
    2021-01-31 10:49

    These are for 11gr2, a quick scan says they are still the same: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/errors.htm#BABHDGGG

    This is from $ORACLE_HOME/rdbms/admin/stdspec.sql (good point from egorius standard package is the place to look for the answer)

          /********** Predefined exceptions **********/
    
      CURSOR_ALREADY_OPEN exception;
        pragma EXCEPTION_INIT(CURSOR_ALREADY_OPEN, '-6511');
    
      DUP_VAL_ON_INDEX exception;
        pragma EXCEPTION_INIT(DUP_VAL_ON_INDEX, '-0001');
    
      TIMEOUT_ON_RESOURCE exception;
        pragma EXCEPTION_INIT(TIMEOUT_ON_RESOURCE, '-0051');
    
      INVALID_CURSOR exception;
        pragma EXCEPTION_INIT(INVALID_CURSOR, '-1001');
    
      NOT_LOGGED_ON exception;
        pragma EXCEPTION_INIT(NOT_LOGGED_ON, '-1012');
    
      LOGIN_DENIED exception;
        pragma EXCEPTION_INIT(LOGIN_DENIED, '-1017');
    
      NO_DATA_FOUND exception;
        pragma EXCEPTION_INIT(NO_DATA_FOUND, 100);
    
      ZERO_DIVIDE exception;
        pragma EXCEPTION_INIT(ZERO_DIVIDE, '-1476');
    
      INVALID_NUMBER exception;
        pragma EXCEPTION_INIT(INVALID_NUMBER, '-1722');
    
      TOO_MANY_ROWS exception;
        pragma EXCEPTION_INIT(TOO_MANY_ROWS, '-1422');
    
      STORAGE_ERROR exception;
        pragma EXCEPTION_INIT(STORAGE_ERROR, '-6500');
    
      PROGRAM_ERROR exception;
        pragma EXCEPTION_INIT(PROGRAM_ERROR, '-6501');
    
      VALUE_ERROR exception;
        pragma EXCEPTION_INIT(VALUE_ERROR, '-6502');
    
      ACCESS_INTO_NULL exception;
        pragma EXCEPTION_INIT(ACCESS_INTO_NULL, '-6530');
    
      COLLECTION_IS_NULL exception;
        pragma EXCEPTION_INIT(COLLECTION_IS_NULL , '-6531');
    
      SUBSCRIPT_OUTSIDE_LIMIT exception;
        pragma EXCEPTION_INIT(SUBSCRIPT_OUTSIDE_LIMIT,'-6532');
    
      SUBSCRIPT_BEYOND_COUNT exception;
        pragma EXCEPTION_INIT(SUBSCRIPT_BEYOND_COUNT ,'-6533');
    
      -- exception for ref cursors
      ROWTYPE_MISMATCH exception;
      pragma EXCEPTION_INIT(ROWTYPE_MISMATCH, '-6504');
    
      SYS_INVALID_ROWID  EXCEPTION;
      PRAGMA EXCEPTION_INIT(SYS_INVALID_ROWID, '-1410');
    
      -- The object instance i.e. SELF is null
      SELF_IS_NULL exception;
        pragma EXCEPTION_INIT(SELF_IS_NULL, '-30625');
    
      CASE_NOT_FOUND exception;
        pragma EXCEPTION_INIT(CASE_NOT_FOUND, '-6592');
    
      -- Added for USERENV enhancement, bug 1622213.
      USERENV_COMMITSCN_ERROR exception;
        pragma EXCEPTION_INIT(USERENV_COMMITSCN_ERROR, '-1725');
    
      -- Parallel and pipelined support
      NO_DATA_NEEDED exception;
        pragma EXCEPTION_INIT(NO_DATA_NEEDED, '-6548');
      -- End of 8.2 parallel and pipelined support
    
      /********** Add new exceptions here **********/
    

提交回复
热议问题