This was first published on https://blog.dbi-services.com/testing-oracle-sql-online (2018-01-28)
Republishing here for new followers. The content is related to the the versions available at the publication date
Want to test some DDL, a query, check an execution plan? You need only a browser. And you can copy-paste, or simply link, your test-case in a forum, a tweet, an e-mail, a tweet. Here is a small list (expecting to grow from your comments) of free online services which can run with an Oracle Database: SQL Fiddle, Rextester, db<>fiddle and Oracle Live SQL
SQL Fiddle let you build a schema and run DDL on the following databases:
As an Oracle user, the Oracle 11gR2 is not very useful as it is a version from 2010. But there’s a simple reason for that: that’s the latest free version – the Oracle XE Edition. And a free online service can run only free software. Now that Oracle plans to release an XE version every year, this should be better soon.
Example: http://sqlfiddle.com/#!4/42960/1/0
Rextester is a service to compile code online, in a lot of languages and also the following databases:
Example: http://rextester.com/QCYJF41984
Rextester has also an API where you can run a query and get a JSON answer:
$ curl -s --request POST --data 'LanguageChoice=35 Program=select * from dual' http://rextester.com/rundotnet/api {"Warnings":null,"Errors":null,"Result":"\u003ctable class=\"sqloutput\"\u003e\u003ctbody\u003e\u003ctr\u003e\u003cth\u003e\u0026nbsp;\u0026nbsp;\u003c/th\u003e\r\n\u003cth\u003eDUMMY\u003c/th\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\r\n\u003ctd\u003eX\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003c/tbody\u003e\u003c/table\u003e\r\n","Stats":"absolute service time: 1,37 sec","Files":null}The answer has the result as an HTML table:
$ curl -s --request POST --data 'LanguageChoice=35 Program=select * from dual' http://rextester.com/rundotnet/api | jq -r .Result <table class="sqloutput"><tbody><tr><th> nbsp; nbsp;</th> <th>DUMMY</th> </tr> <tr><td>1</td> <td>X</td> </tr> </tbody></table>Here is my SELECT * FROM DUAL:
$ curl -s --request POST --data 'LanguageChoice=35 Program=select * from dual' http://rextester.com/rundotnet/api | jq -r .Result | lynx -dump -stdin DUMMY 1 X
db<>fiddle has a very nice interface, easy to link and easy to paste to StackOverflow (click on ‘markdown’)
Example: http://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=948a067dd17780ca65b01243751c2cb0
Finally, you can also run on the latest release of Oracle, with a service provided by Oracle itself: Live SQL.
Example: https://livesql.oracle.com/apex/livesql/s/f6ydueahcslf66dlynagw9s3w
Helpful blog post! Thanks much for sharing such an informative post with us as very useful to test Oracle SQL online. I appreciate for the screenshots as those really added value to your explanation. Thank you very much!
Best Regards Roberto, Testree