SyntaxFix
Write A Post
Hire A Developer
Questions
Using 'sqlparse' library we can format the sqls.
>>> import sqlparse >>> raw = 'select * from foo; select * from bar;' >>> print(sqlparse.format(raw, reindent=True, keyword_case='upper')) SELECT * FROM foo; SELECT * FROM bar;
Ref: https://pypi.org/project/sqlparse/