Are there any (Linux based) SQL Query Formatting programs/plugins/extensions?
I use PostgreSQL and MySQL but other DB's are welcome as well.
I can use a VM to test with but would prefer a Linux (Ubuntu) based solution.
I have seen a online version but nothing as a installable.
Eclipse Based IDE's are a plus as well
Example:
select f1, f2, fname, lName from tblName where f1 = true and fname is not null order by lName asc
to something like
SELECT f1, f2, fname, lName
FROM tblName
WHERE f1 = true
AND fname IS NOT NULL
ORDER BY lName ASC
Here is a online example:
- http://www.dpriver.com/pp/sqlformat.htm
But I would rather this be in a local environment
Related:
- https://stackoverflow.com/questions/3310188/free-sql-formatting-tool
UPDATE:
Looking at this:
- https://github.com/darold/pgFormatter
FINAL UPDATE:
While this might be an overkill JetBrains has a database IDE, DataGrip , which has some great re-formatting options.
Asked by Phill Pafford
(1415 rep)
Jan 20, 2012, 09:05 PM
Last activity: Nov 15, 2024, 11:34 PM
Last activity: Nov 15, 2024, 11:34 PM