{
  "date": "2018-01-27T22:38:36",
  "slug": "testing-oracle-sql-online",
  "link": "https://www.dbi-services.com/blog/testing-oracle-sql-online/",
  "title": {
    "rendered": "Testing Oracle SQL online"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\nWant 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&lt;&gt;fiddle and Oracle Live SQL<br />\n<!--more--></p>\n<h3>SQL Fiddle</h3>\n<p>SQL Fiddle let you build a schema and run DDL on the following databases:</p>\n<ul>\n<li>Oracle 11<i>g</i>R2</li>\n<li>Microsoft SQL Server 2014</li>\n<li>MySQL 5.6</li>\n<li>Postgres 9.6 and 9.3</li>\n<li>SQLLite (WebSQL and SQL.js)</li>\n</ul>\n<p>As an Oracle user, the Oracle 11gR2 is not very useful as it is a version from 2010. But there&#8217;s a simple reason for that: that&#8217;s the latest free version &#8211; 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.</p>\n<p>Example: <a href=\"http://sqlfiddle.com/#!4/42960/1/0\" target=\"_blank\" rel=\"noopener noreferrer\">http://sqlfiddle.com/#!4/42960/1/0</a></p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureSQLfiddle.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureSQLfiddle.png\" alt=\"CaptureSQLfiddle\" width=\"805\" height=\"555\" class=\"aligncenter size-full wp-image-20824\" /></a></p>\n<h3>Rextester</h3>\n<p>Rextester is a service to compile code online, in a lot of languages and also the following databases:</p>\n<ul>\n<li>Oracle 11<i>g</i>R2</li>\n<li>Microsoft SQL Server 2014</li>\n<li>MySQL 5.7</li>\n<li>PostgreSQL 9.6</li>\n</ul>\n<p>Example: <a href=\"http://rextester.com/QCYJF41984\" target=\"_blank\" rel=\"noopener noreferrer\">http://rextester.com/QCYJF41984</a></p>\n<p>Rextester has also an API where you can run a query and get a JSON answer:</p>\n<pre><code>\n$ curl -s  --request POST --data 'LanguageChoice=35&nbsp;Program=select * from dual' http://rextester.com/rundotnet/api\n{\"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}\n</code></pre>\n<p>The answer has the result as an HTML table:</p>\n<pre><code>\n$ curl -s  --request POST --data 'LanguageChoice=35&nbsp;Program=select * from dual' http://rextester.com/rundotnet/api | jq -r .Result\n&lt;table class=\"sqloutput\"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;&nbsp;nbsp;&nbsp;nbsp;&lt;/th&gt;\n&lt;th&gt;DUMMY&lt;/th&gt;\n&lt;/tr&gt;\n&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;\n&lt;td&gt;X&lt;/td&gt;\n&lt;/tr&gt;\n&lt;/tbody&gt;&lt;/table&gt;\n</code></pre>\n<p>Here is my SELECT * FROM DUAL:</p>\n<pre><code>\n$ curl -s  --request POST --data 'LanguageChoice=35&nbsp;Program=select * from dual' http://rextester.com/rundotnet/api | jq -r .Result | lynx -dump -stdin\n       DUMMY\n    1  X\n</code></pre>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/Capturerextester1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/Capturerextester1.png\" alt=\"Capturerextester\" width=\"1004\" height=\"780\" class=\"aligncenter size-full wp-image-20831\" /></a></p>\n<h3>db&lt;&gt;fiddle</h3>\n<p>db&lt;&gt;fiddle has a very nice interface, easy to link and easy to paste to StackOverflow (click on &#8216;markdown&#8217;)</p>\n<ul>\n<li>Oracle 11<i>g</i>R2</li>\n<li>SQL Server 2014 2016 2017, and even 2017 Linux version.</li>\n<li>MariaDB 10.2</li>\n<li>SQLite 3.8</li>\n<li>PostgreSQL 8.4 9.4 9.6 10</li>\n</ul>\n<p>Example: <a href=\"http://dbfiddle.uk/?rdbms=oracle_11.2&amp;fiddle=948a067dd17780ca65b01243751c2cb0\" target=\"_blank\" rel=\"noopener noreferrer\">http://dbfiddle.uk/?rdbms=oracle_11.2&amp;fiddle=948a067dd17780ca65b01243751c2cb0</a></p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/Capturedbfiddle.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/Capturedbfiddle.png\" alt=\"Capturedbfiddle\" width=\"786\" height=\"562\" class=\"aligncenter size-full wp-image-20828\" /></a></p>\n<h3>Oracle Live SQL</h3>\n<p>Finally, you can also run on the latest release of Oracle, with a service provided by Oracle itself: Live SQL.</p>\n<ul>\n<li>Oracle 12<i>c</i>R2 (an early build from October 2016)</li>\n</ul>\n<p>Example: <a href=\"https://livesql.oracle.com/apex/livesql/s/f6ydueahcslf66dlynagw9s3w\" target=\"_blank\" rel=\"noopener noreferrer\">https://livesql.oracle.com/apex/livesql/s/f6ydueahcslf66dlynagw9s3w</a></p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureLiveSQL.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureLiveSQL.png\" alt=\"CaptureLiveSQL\" width=\"1234\" height=\"389\" class=\"aligncenter size-full wp-image-20829\" /></a></p>\n",
    "protected": false
  }
}
