Hacker News new | ask | show | jobs
by maurycy 3519 days ago
Is there indent for SQL?
3 comments

Poor Man's SQL Formatter for Notepad++ can do it, it leaves a lot to be desired though in terms of customization. It has saved me a lot of times, since I'd rather read Poor Man's code than the code of the other people.
Another vote for Poor Man's.

But I think it's an important caveat that the whole team use the same formatter and the same settings.

Otherwise diff's turn to useless noise* because Cubicle Bob has personalized his settings.

*Yes, I've tried the Winmerge plugin. It's helpful but not ideal.

For Microsoft's SQL Server Management Studio, try SSMS Boost (http://www.ssmsboost.com/). There is a free community edition.]

They just released a beta for SSMS 2016 that has a lot more flexible SQL formatting features. See http://www.ssmsboost.com/social/posts/m12279-SSMSBoost-v3-0-....

I am using Jetbrains Datagrip to write SQL all day, every day. It can auto-format SQL just like all their other tools can auto-format the language in use. It also has a bunch of other handy stuff like symbol completion from the current database.