An exception is an exception that has been defined in pl/SQL and given the Exception name. They are all placed in the standard package that comes with pl/SQL, so that pl/SQL programmers do not need to define them again.
There are 21 predefined standard exceptions in Oracle:
OracleException name |
Error Code |
Description |
DUP_VAL_ON_INDEX |
ORA-00001 |
You tried to execute an INSERT or UPDATE statement that has created a duplicate value in a field restricted by a unique index.Trying to break a unique restriction |
TIMEOUT_ON_RESOURCE |
ORA-00051 |
You were waiting for a resource and you timed out.Timeout while waiting for resources |
TRANSACTION_BACKED_OUT |
ORA-00061 |
The remote portion of a transaction has rolled back.The deadlock transaction is canceled. |
INVALID_CURSOR |
ORA-01001 |
You tried to reference a cursor that does not yet exist. This may have happened because you 've executed a FETCH cursor or CLOSE cursor before OPENing the cursor.Try to use an unopened cursor |
NOT_LOGGED_ON |
ORA-01012 |
You tried to execute a call to Oracle before logging in.Not connectedORACLE |
LOGIN_DENIED |
ORA-01017 |
You tried to log into Oracle with an invalid username/password combination.Invalid user name/Password |
NO_DATA_FOUND |
ORA-01403 |
SELECTNo data foundYou tried one of the following: You executed a select into statement and no rows were returned.You referenced an uninitialized row in a table.You read past the end of file with the UTL_FILE package. |
TOO_MANY_ROWS |
ORA-01422 |
SELECTReturn multiple rowsYou tried to execute a select into statement and more than one row was returned. |
ZERO_DIVIDE |
ORA-01476 |
Try to be division by zeroYou tried to divide a number by zero. |
INVALID_NUMBER |
ORA-01722 |
An error occurred while converting a number.You tried to execute an SQL statement that tried to convert a string to a number, but it was unsuccessful. |
STORAGE_ERROR |
ORA-06500 |
Internal error caused by insufficient memory or Memory CorruptionYou ran out of memory or memory was too upted. |
PROGRAM_ERROR |
ORA-06501 |
Internal error,You need to reinstall the data dictionary view andPl/SQLPackageThis is a generic "Contact Oracle support" message because an internal problem was encountered. |
VALUE_ERROR |
ORA-06502 |
Assign value. If the variable length is insufficient, this exception is triggered.You tried to perform an operation and there was a error on a conversion, truncation, or invalid constraining of numeric or character data. |
ROWTYPE_MISMATCH |
ORA-6504 |
Host cursor variable andPL/SQLThe variable has incompatible row types. |
CURSOR_ALREADY_OPEN |
ORA-06511 |
Try to open an opened cursorYou tried to open a cursor that is already open. |
Access_assist_null |
ORA-6530 |
TryNullObject attribute assignment |
COLLECTION_IS_NULL |
ORA-6531 |
Try to give non-initialized nested table variables orVarryVariable assignment |
SUBSCRIPT_OUTSIDE_LIMIT |
ORA-6532 |
For nested orVarrayThe index uses a negative number. |
SUBSCRIPT_BEYOND_COUNT |
ORA-6533 |
For nested orVarrayThe index reference is greater than the number of elements in the set. |