Take the 2-minute tour ×

I am looking for a simple library [free] wherein i can use something like this:-

String formattedSQL = xyzLib.format ( sql );

Is there any such library? Or is there a way to format the SQL?

share|improve this question
What, like pretty-printing? –  T.J. Crowder Nov 18 '10 at 10:25

1 Answer 1

up vote 3 down vote accepted

I'm not aware of a library that does this, but you might look at Hibernate's sql formatter. From my experience it does a pretty good job at prettifying SQL statements, but as always, it might not be exactly what you want.

share|improve this answer
That's what i wanted :) –  Rakesh Juyal Nov 18 '10 at 12:24

Your Answer


