U6 ORACLE PLSQL 2025 Internal Exceptions Students
U6 ORACLE PLSQL 2025 Internal Exceptions Students
Internal exceptions
• They are those defined by Oracle.
• It is not necessary to declare them.
• They do not need the clause: RAISE. They are raised
automatically when a program:
• Violates any Oracle rule.
• Exceeds any of the established limits for the resources it
needs (e.g. memory).
• Like any exception, they are handled in the block:
EXCEPTION
● DUP_VAL_ON_INDEX
An attempt is made to store a value that already exists in a column that does not
support duplicates.(P KEY, UNIQUE).
● NO_DATA_FOUND
• SELECT..INTO (implicit cursor) does not return any rows.
• A row of an undefined table is referenced.
● TOO_MANY_ROWS
SELECT INTO (implicit cursor) returns more than one row.
cc-by-sa Gema Cervigón. Guadalupe Bermejo UT7 DDBB
PL/SQL. Internal exceptions
19. Implement a procedure that increases the salary of the
highest earner in the given department by 100 euros.
TOO_MANY_ROWS