-1

I am a beginner in oracle sql. I want to test out a simple anonymous block as following from sql plus in expecting "foo" but instead numeric value "2" is returned. I am trying to understand why.

set serveroutput on size 20000;
begin 
  dbms_output.put_line('foo'); 
end; 
/
DaeYoung
  • 1,161
  • 6
  • 27
  • 59

1 Answers1

0

You probably missed the final /; besides, the procudere you want to call is put_line ( with the underscore).

SQL> set serveroutput on size 20000;
SQL> begin
  2    dbms_output.put_line('foo');
  3  end;
  4  /
foo

PL/SQL procedure successfully completed.

SQL>
Aleksej
  • 22,443
  • 5
  • 33
  • 38