SQL Developer's new format hints

booyaa

Mark Sta Ana

Posted on August 26, 2018

SQL Developer's new format hints

One of my favourite cool features in SQL Developer is the ability to turn a sql query output into an entirely different format. It doesn't even require breaking out the import/export wizard.

SPOOL C:\TEMP\foobar.csv

SELECT /*csv*/ *
  FROM foo
  LEFT
  JOIN bar
    ON foo.id = bar.id
 WHERE foo.name LIKE '%HURR%';

 SPOOL OFF
Enter fullscreen mode Exit fullscreen mode

Complete list of formats

SELECT /*csv*/ * FROM scott.emp;
SELECT /*xml*/ * FROM scott.emp;
SELECT /*html*/ * FROM scott.emp;
SELECT /*delimited*/ * FROM scott.emp;
SELECT /*insert*/ * FROM scott.emp;
SELECT /*loader*/ * FROM scott.emp;
SELECT /*fixed*/ * FROM scott.emp;
SELECT /*text*/ * FROM scott.emp;
Enter fullscreen mode Exit fullscreen mode

Full details and source can be here.

💖 💪 🙅 🚩
booyaa
Mark Sta Ana

Posted on August 26, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related