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
SQL Fiddle let you build a schema and run DDL on the following databases:
- Oracle 11gR2
- Microsoft SQL Server 2014
- MySQL 5.6
- Postgres 9.6 and 9.3
- SQLLite (WebSQL and SQL.js)
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
Rextester is a service to compile code online, in a lot of languages and also the following databases:
- Oracle 11gR2
- Microsoft SQL Server 2014
- MySQL 5.7
- PostgreSQL 9.6
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
db<>fiddle has a very nice interface, easy to link and easy to paste to StackOverflow (click on ‘markdown’)
- Oracle 11gR2
- SQL Server 2014 2016 2017, and even 2017 Linux version.
- MariaDB 10.2
- SQLite 3.8
- PostgreSQL 8.4 9.4 9.6 10
Example: http://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=948a067dd17780ca65b01243751c2cb0
Oracle Live SQL
Finally, you can also run on the latest release of Oracle, with a service provided by Oracle itself: Live SQL.
- Oracle 12cR2 (an early build from October 2016)
Example: https://livesql.oracle.com/apex/livesql/s/f6ydueahcslf66dlynagw9s3w
Cet article Testing Oracle SQL online est apparu en premier sur Blog dbi services.