Notepad++/Eclipse sql code auto-indent option?

Aubergine picture Aubergine · Oct 24, 2011 · Viewed 54.1k times · Source

DDL gets especially ugly. Is there any option of SQL auto-indenting for Notepad++? I've tried to do it in Eclipse, but the code doesn't react to auto-indent.

Answer

Tao picture Tao · Feb 23, 2012

Yes, there is a free/open-source T-SQL formatting plugin for Notepad++, called "Poor Man's T-SQL Formatter". It is available in the NPP "Plugin Manager" plugin list (gets updated every once in a while automatically), and is also available for manually downloading/installing from here: http://www.architectshack.com/PoorMansTSqlFormatter.ashx

If you just want to check it out without adding to notepad++, you can check the online formatting site:

http://poorsql.com

(disclaimer: I wrote these tools :))