U6 ORACLE PLSQL 2025 Programmer Exceptions Students
U6 ORACLE PLSQL 2025 Programmer Exceptions Students
Exceptions
It is not possible to anticipate all potential exceptions, however, you can write code to
handle exceptions to enable the program to continue running as normal.
The code that you write to handle exceptions is called an exception handler.
A PL/SQL block can have an exception-handling section, which can have one or more
exception handlers.
[WHEN OTHERS]
<instrucciones-x>
END <programa>; cc-by-sa Gema Cervigón. Guadalupe Bermejo UT7 DDBB 9
PL/SQL. Programmer's exceptions. RAISE
14. Implement a procedure that increases by 5% the salary of workers in a given
department. What happens when a NON-EXISTING
Basic implementation department number is given? The
CREATE OR REPLACE programme reports a missing upload.
PROCEDURE Increase_Salary (ndepart IN Emp.deptno%TYPE) IS
BEGIN
UPDATE Emp
SET sal = sal*1.05
WHERE deptno = ndepart;
DBMS_OUTPUT.PUT_LINE(' Increased salary ');
END Increase_Salary;
EXECUTE Increase_Salary3( 15 )
***Error on depart[10,20,30,40]