Oracle Getting started with PL SQL
Command SET serveroutput ON is required in SQL*Plus and SQL Developer clients to enable the output of DBMS_OUTPUT. Without the command nothing is displayed.
The END; line signals the end of the anonymous PL/SQL block. To run the code from SQL command line, you may need to type / at the beginning of the first blank line after the last line of the code. When the above code is executed at SQL prompt, it produces the following result: