SQL>
SQL> SET ECHO ON
SQL> DECLARE
2 X VARCHAR2(12) := 'Hello World!';
3 BEGIN
4 DBMS_OUTPUT.PUT_LINE(X);
5 EXCEPTION
6 WHEN OTHERS THEN
7 DBMS_OUTPUT.PUT_LINE('An error occurred.');
8 END;
9 /
Hello World!
SQL>
SQL>