Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 383
GWu Avatar asked Jul 14 '12 11:07

GWu


People also ask

Is there a PL SQL engine in SQL * Plus?

Like SQL, PL/SQL executes inside the database engine. SQL*Plus is an Oracle-developed tool that allows you to interactively enter and execute SQL commands and PL/SQL blocks.

How do I run PL SQL code in Toad?

Code can easily be run by clicking the Run button or pressing the F11 key. Figure 4.36 illustrates the parameter screen as TOAD noticed that this procedure has input variables.


1 Answers

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

like image 80
GWu Avatar answered Sep 19 '22 18:09

GWu