In SQL Server we often need to write a variety of SQL scripts, such as stored procedures and functions, because in the process of writing, often adjust, the format is very messy, poor readability. For people with obsessive-compulsive disorder, it's very painful to look at code like this, and it's very time-consuming and laborious to manually format the code and if the code script is much more. So the question is, how to quickly format the code in SQL Server.
I searched the Internet, read an article said there is a tool SQL pretty Printer add-in for SSMS, is a SQL Server Management tool plug-in, very strong, formatted SQL code is very good, you can also apply for a free registration code, download it to try a bit , it feels very good. Here to share with you.
After you download and install the SQL pretty Printer add-in for SSMS V3.6.1, you can see the SQL Beautifier menu in the SQL Server 2008 Administration Tool:
You can format your messy SQL code by tapping the format all SQL menu. The following is the effect of formatting the SQL shown above.
Isn't it very regular and beautiful?!
SQL Pretty printer currently offers 4 ways to use, desktop version, SSMS (SQL Server Management Studio) plugin, vs plug-in, and provides API interface.
Download Link: http://www.dpriver.com/dlaction.php
Online version (Chinese not supported): http://www.dpriver.com/pp/sqlformat.htm
Get your FREE Authorization code: http://www.dpriver.com/products/sqlpp/getforfree.php
SQL format Plugin-sql pretty Printer