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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.