SQL formatting

Aino Andriessen 3
0 0
Read Time:28 Second

Eddie Awad has a nice blog about three apps to format your SQL code. Especially the online tools, SQLinForm en the Online SQL Formatter, are very nice. Both offer some options to select the SQL dialect and the output format (e.g. upper/lowercase) and language (SQL, VB, Java etc). The former, being a java applet, is more feature-rich than the latter. Example:

select ename from (select ename from emp order by sal desc) where rownum < 4

becomes

SELECT ename
FROM
    ( SELECT ename
    FROM emp
    ORDER BY sal desc
    )
WHERE rownum < 4

About Post Author

Aino Andriessen

Aino Andriessen is principal consultant and expertise lead 'Continuous Delivery'. His focus is on Oracle Fusion Middleware ADF and SOA development, Continuous Delivery, architecture, improving the software development proces and quality management. He is a frequent presenter at Oracle Open World, ODTUG Kaleidoscope, UKOUG Technology Conference and OUGN Vårseminar. He writes articles and publishes at the AMIS technology blog (http://technology.amis.nl/blog/).
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

3 thoughts on “SQL formatting

  1. SELECT   Last_Name,
             Salary,
             Department_Id
    FROM     Employees
    WHERE    Salary &lt  ANY (SELECT   Salary
                            FROM     Employees
                            WHERE    Job_Id = ‘it_prog’
                            ORDER BY 2)
             AND Job_Id &lt&gt ‘it_prog’
    ORDER BY 1

  2. Cool, I’ve been missing the SQL formatter in SQL*Navigator ever since I changed jobs. The option to download Online SQL Formatter and integrate it into our build is very tempting… Thanks for the pointers!

Comments are closed.

Next Post

JavaPolis: the European equivalent of JavaOne!?

JavaPolis 2005 is in town. Well, not my town, it is actually in Antwerp in Belgium. It is the largest conference on Java/J2EE technology in Europe, with this year attendees from 35 countries. 2005 is the 4th edition of JavaPolis and it may be the first where the number of […]
%d bloggers like this: