Errors and messages v14

Use the DBMS_OUTPUT.PUT_LINE statement to report messages:

DBMS_OUTPUT.PUT_LINE ( <message> );

Where message is any expression evaluating to a string.

This example displays the message on the user’s output display:

DBMS_OUTPUT.PUT_LINE('My name is John');

The special variables SQLCODE and SQLERRM contain a numeric code and a text message, respectively, that describe the outcome of the last SQL command issued. If any other error occurs in the program, such as division by zero, these variables contain information about the error.