Use dbms_output.put_line to display varchar2 type value : DBMS_OUTPUT « PL SQL « Oracle PL / SQL






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

1.Print out value using DBMS_OUTPUT.PUT_LINE
2.DBMS_OUTPUT package
3.Concatenate string and number