Search notes:

Oracle PL/SQL: Exceptions

Each exception is associated with a numerical code. In an exception handler, this code can be queried from the function sqlcode.

Predefined exceptions

Oracle has some predefined exceptions:
Name Error Code
access_into_null -6530
case_not_found -6592
collection_is_null -6531
cursor_already_open -6511
dup_val_on_index -1
invalid_cursor -1001
invalid_number -1722
login_denied -1017
no_data_found +100 Compare with ORA-01403: no data found. Compare with exception too_many_rows
no_data_needed -6548
not_logged_on -1012
program_error -6501
rowtype_mismatch -6504
self_is_null -30625
storage_error -6500
subscript_beyond_count -6533
subscript_outside_limit -6532
sys_invalid_rowid -1410
timeout_on_resource -51
too_many_rows -1422 Compare with no_data_found
value_error -6502
zero_divide -1476

See also

Throwing and catching exceptions, exception handlers
raise_application_error raises an exception.
when X or Y

Index