PL/SQL block or subprogram should raise error message when undesirable or impossiable to finish processing. You can place RAISE statement for an exception within the scope of that exception.
SET SERVEROUTPUT ON
DECLARE
out_of_stock EXCEPTION;
stock_in_hand NUMBER(10) := 100
BEGIN
IF stock_in_hand < 1000 THEN
RAISE out_of_stock;
END IF;
EXCEPTION
WHEN out_of_stock THEN
DBMS_OUTPUT.PUT_LINE ('Stock in hand is less than 1000');
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...
-
Oracle PL/SQL block accepts user input information with the help of substitution variable. Substitute variable can not be used to output va...
-
Table clustering is an optional technique of storing data. In table clustering, rows from one or more tables those are associated with ea...
-
DECLARE TYPE emp_ref_cursor IS REF CURSOR; TYPE empno_tab IS TABLE OF NUMBER; TYPE ename_tab IS TABLE OF VARCHAR2(50); v_emp_...
No comments:
Post a Comment