Use dbms_output.put_line to display varchar2 type value
SQL>
SQL> set serverout on
SQL>
SQL> declare
2 myText varchar2(100);
3 begin
4 myText := 'Hello, World!';
5 dbms_output.put_line(myText);
6 exception
7 when others then
8 dbms_output.put_line('We encountered an exception!');
9 raise;
10 end;
11 /
Hello, World!
PL/SQL procedure successfully completed.
SQL>
Related examples in the same category