SQL string formatter

Posted by Paul D. Eden on Stack Overflow See other posts from Stack Overflow or by Paul D. Eden
Published on 2008-12-24T18:35:11Z Indexed on 2010/05/21 6:40 UTC
Read the original article Hit count: 351

Filed under:
|
|
|

Does anyone know of a program, a utility, or some programmatic library, preferably for Linux, that takes an unformatted SQL string and pretty prints it?

For example I would like the following

select * from users where name = 'Paul'

be changed to something like this

select * 
from users
where
   name = 'Paul'

The exact formatting is not important. I just need something to take a large SQL string and break it up into something more readable.

© Stack Overflow or respective owner

Related posts about sql

Related posts about linux