Nazarii Gudzovatyi

Errors should never pass silently.

Make SQL Query Looks Nice

Found nice resource for SQL formatting: http://sqlformat.appspot.com/ . Service allows you to get nice SQL output from existing query quickly, so formatting:

SQL
1
2
3
4
select *
from foo
join bar on val1 = val2
where id = 123;

will result in

SQL
1
2
3
4
SELECT *
FROM foo
JOIN bar ON val1 = val2
WHERE id = 123;

which looks nice and more readable, especially when you have long queries. Basicly service is demonstration of Python library python-sqlparse which is more pleasant. Enjoy it!

Comments