0% found this document useful (0 votes)
44 views

Exception Oracle Error Sqlcode Description

The document describes various Oracle database exceptions along with their SQLCODE and description. Common exceptions include ACCESS_INTO_NULL which occurs when a null object is assigned a value, CASE_NOT_FOUND when no WHEN clause matches, COLLECTION_IS_NULL when collection methods are applied to uninitialized collections, and DUP_VAL_ON_INDEX when duplicate values are inserted violating a unique index.

Uploaded by

Mervat Sabbah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Exception Oracle Error Sqlcode Description

The document describes various Oracle database exceptions along with their SQLCODE and description. Common exceptions include ACCESS_INTO_NULL which occurs when a null object is assigned a value, CASE_NOT_FOUND when no WHEN clause matches, COLLECTION_IS_NULL when collection methods are applied to uninitialized collections, and DUP_VAL_ON_INDEX when duplicate values are inserted violating a unique index.

Uploaded by

Mervat Sabbah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Oracle

Exception SQLCODE Description


Error

It is raised when a null object is automatically


ACCESS_INTO_NULL 06530 -6530
assigned a value.

It is raised when none of the choices in the


CASE_NOT_FOUND 06592 -6592 WHEN clause of a CASE statement is selected,
and there is no ELSE clause.

It is raised when a program attempts to apply


collection methods other than EXISTS to an
COLLECTION_IS_NUL uninitialized nested table or varray, or the
06531 -6531
L program attempts to assign values to the
elements of an uninitialized nested table or
varray.

It is raised when duplicate values are attempted


DUP_VAL_ON_INDEX 00001 -1
to be stored in a column with unique index.

It is raised when attempts are made to make a


INVALID_CURSOR 01001 -1001 cursor operation that is not allowed, such as
closing an unopened cursor.

It is raised when the conversion of a character


INVALID_NUMBER 01722 -1722 string into a number fails because the string
does not represent a valid number.

It is raised when a program attempts to log on


LOGIN_DENIED 01017 -1017 to the database with an invalid username or
password.

It is raised when a SELECT INTO statement


NO_DATA_FOUND 01403 +100
returns no rows.

It is raised when a database call is issued


NOT_LOGGED_ON 01012 -1012
without being connected to the database.

It is raised when PL/SQL has an internal


PROGRAM_ERROR 06501 -6501
problem.
It is raised when a cursor fetches value in a
ROWTYPE_MISMATCH 06504 -6504
variable having incompatible data type.

It is raised when a member method is invoked,


SELF_IS_NULL 30625 -30625 but the instance of the object type was not
initialized.

It is raised when PL/SQL ran out of memory or


STORAGE_ERROR 06500 -6500
memory was corrupted.

It is raised when a SELECT INTO statement


TOO_MANY_ROWS 01422 -1422
returns more than one row.

It is raised when an arithmetic, conversion,


VALUE_ERROR 06502 -6502
truncation, or sizeconstraint error occurs.

It is raised when an attempt is made to divide a


ZERO_DIVIDE 01476 1476
number by zero.

Triggers are stored programs, which are automatically executed or fired when some events occur.
Triggers are, in fact, written to be executed in response to any of the following events −

 A database manipulation (DML) statement (DELETE, INSERT, or UPDATE)

 A database definition (DDL) statement (CREATE, ALTER, or DROP).

 A database operation (SERVERERROR, LOGON, LOGOFF, STARTUP, or SHUTDOWN).

Triggers can be defined on the table, view, schema, or database with which the event is associated.

Note/ (WHEN clause) => This provides a condition for rows for which the trigger would fire and this
clause is valid only for row level triggers.

You might also like