You can raise pre-defined exception explicitly.
SET SERVEROUTPUT ON
DECLARE
deptno NUMBER(3) := 40;
BEGIN
IF deptno NOT IN ( 10,20,30 ) THEN
RAISE INVALID_NUMBER;
END IF;
EXCEPTION
WHEN INVALID_NUMBER THEN
DBMS_OUTPUT.PUT_LINE (' Invalid Deptno supplied');
ROLLBACK;
END;
Subscribe to:
Post Comments (Atom)
External Table
Oracle External Table External tables are defined as tables that do not resides in the database allows you to access data that is stor...
-
Table clustering is an optional technique of storing data. In table clustering, rows from one or more tables those are associated with ea...
-
Oracle PL/SQL block accepts user input information with the help of substitution variable. Substitute variable can not be used to output va...
-
Finally continue statement added to oracle 11g PL/SQL language. It signals an immediate end to a loop iteration and return to first statemen...
No comments:
Post a Comment