DBMS_OUTPUT Examples

DBMS_OUTPUT.PUT_LINE

DECLARE
   c varchar2(200):= 'This is a DBMS_OUTPUT.PUT_LINE test';
BEGIN
   DBMS_OUTPUT.PUT_LINE (c);
END;

Result:  This is a DBMS_OUTPUT.PUT_LINE test


DBMS_OUTPUT.NEW_LINE

DECLARE
  c1 varchar(25) := 'test_1';
  c2 varchar(25) := 'test_2';
BEGIN
   dbms_output.put_line(c1);
   dbms_output.new_line;
   dbms_output.put_line(c2);
   dbms_output.new_line;
   dbms_output.put_line(c1);
END ;

Result:
test_1

test_2

test_1