Search code examples
oracleplsqlsqlfiddle

how to get PL/SQL in SQLFiddle?


Any clues how to get PL/SQL in SQLFiddle?

I've tried

begin
 dbms_output.put_line('Hello World');
end;
/

or

begin
 null; 
end;
/

which works in SQL*Plus (or TOAD or SQLDeveloper or ...) but SQLFiddle just gives me

ORA-06550: line 2, column 36: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: := . ( % ; : begin dbms_output.put_line('Hello World')

So it seems there is some kind of PL/SQL engine in place but I can't figure out how to get it to parse anonymous program units.

See for example http://www.sqlfiddle.com/#!4/db36d/4


Solution

  • As @Lieven correctly pointed out: There is a button below right where you can toggle the query terminator to /.

    Working example at http://www.sqlfiddle.com/#!4/db36d/5