可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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.
回答1:
You could try SQL Formatter (webbased). I think there was a similar question some time ago.
Edit: Yup, duplicate question.
回答2:
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.
回答3:
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!
回答4:
Well, formatting the code online can be done through http://www.dpriver.com/pp/sqlformat.htm . They also provide an offline version.
回答5:
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.
回答6:
I think SQL Refactor is going to take care of me:
SQL Refactor
回答7:
Try the tools by Quest Software. See the SQL Navigator/Toad for Oracle and/or Toad for SQL Server.