I want to beautify the SQL queries I write.
What free tools exist that allow for SQL query formatting?
I want to beautify the SQL queries I write.
What free tools exist that allow for SQL query formatting?
PoorMansTSqlFormatter is a free and open-source online beautifier, with offline an SSMS Add-In, command-line beautifier tool, and Notepad++ plugin.
The project aims to format any T-SQL (2000 or later) script, no matter the length or complexity.
T-SQL Tidy (dead link) was a very good online SQL formatter/beautifier.
It had a lot of formatting options. Although it was targeted at T-SQL, it should have worked with most SQL dialects.
There is a free online Instant SQL Formatter. The site also sells some other versions (add-in for Visual Studio, for example), but the online version is free.
I was looking for the same in Notepad++ and found a link that gives an idea of how to create your own formatting with macros: Formatting SQL in Notepad++
It seems like it would work, but I'm going to use one of the SSMS Add-ins in the previous answer (less work).
I've always been a fan of Navicat.
Their lite version is free, but it still comes with the SQL Beautifier.
As an added bonus, occasionally you'll find some chinglish hiding in odd places.
Sequel Pro if using OS X.
Otherwise, just work out what you need, and then develop your query using your knowledge and use the command line tool (my personal favourite:)).
© 2022 - 2024 — McMap. All rights reserved.