SQL Formatting Tool [duplicate]

2020-02-26 09:40发布

Possible Duplicate:
SQL Formatter for SQL Management Studio

So Visual Studio has a command like Format Document [Ctrl+K, Ctrl+D] is there something similar for SQL Management Studio?

If not is there any other product out there, anywhere, that can help with this?

We have hundreds of these we have to go through in a rather short time span, and as it we spend WAY to much time reformatting them due to poor initial formatting quality.

We are using Microsoft SQL 2008.

7条回答
你好瞎i
2楼-- · 2020-02-26 09:54

I think SQL Refactor is going to take care of me:

SQL Refactor

查看更多
霸刀☆藐视天下
3楼-- · 2020-02-26 09:55

SQL Assistant has worked very well for me. It is a commercial product (not free), but supports a variety of editors at a (IMO) reasonable price.

查看更多
▲ chillily
4楼-- · 2020-02-26 09:57

Try the tools by Quest Software. See the SQL Navigator/Toad for Oracle and/or Toad for SQL Server.

查看更多
霸刀☆藐视天下
5楼-- · 2020-02-26 10:00

There are several tools available. I have found some commercial products to be very good for this:

These two work really well. Then you will find some free tools but none of them worked well for me. :-(

All the commercial products have a trial version. Try them in a VM to see if they work for you or not. They are not cheap so you want to know for sure they work for you.

查看更多
不美不萌又怎样
6楼-- · 2020-02-26 10:01

Well, formatting the code online can be done through http://www.dpriver.com/pp/sqlformat.htm . They also provide an offline version.

查看更多
Rolldiameter
7楼-- · 2020-02-26 10:07

I can suggest you to use SQL Complete. This tool has convenient formatting. You can also to try free version and to see how does it work.

Your welcome!

查看更多
登录 后发表回答