Database Reference
In-Depth Information
statements…;
IF condition THEN GOTO labelone; END IF;
statements…;
IF condition THEN GOTO labeltwo; END IF;
statements…;
<<labeltwo>>
statements…;
END;
24.7.3.2
The NULL Command
The NULL command does nothing. A common use for the NULL com-
mand is to ignore an error trap (no error is returned). In the following code
sample, the SELECT statement will cause an SQL error because the
ARTIST_ID value of 0 does not exist in the ARTIST table. The result is
that the second DBMS_OUTPUT.PUT_LINE procedure will not be exe-
cuted because control is passed out of the PL/SQL block. See the result in
Figure 24.22.
DECLARE
VNAME ARTIST.NAME%TYPE;
BEGIN
DBMS_OUTPUT.PUT_LINE('Start');
SELECT NAME INTO VNAME FROM ARTIST
WHERE ARTIST_ID = 0;
DBMS_OUTPUT.PUT_LINE('Finish');
EXCEPTION WHEN OTHERS THEN NULL;
END;
/
24.8
Objects and Methods
There is capability in PL/SQL for creation of classes and attached methods.
Object-oriented PL/SQL code can be constructed. However, this area of
PL/SQL coding is extremely complex and perhaps one arena that is a little
beyond the scope of this topic.
Search WWH ::




Custom Search