I'm looking for a script or application that tidies up and reformats SQL queries. I've found some good online SQL formatters (see here) , as well as some downloadable commercial applications. I'm cautious about using an online service as I don't want to risk copies of these queries being stored somewhere they might be compromised, if only in a web server's cache (and it is against my employer's policy).
我正在寻找一个整理和重新格式化SQL查询的脚本或应用程序。我找到了一些很好的在线SQL格式化程序(见这里),以及一些可下载的商业应用程序。我对使用在线服务持谨慎态度,因为我不想冒险将这些查询的副本存储在可能被泄露的地方,如果只是在Web服务器的缓存中(并且违反了我的雇主的政策)。
Does anyone know of any open-source applications, scripts, or downloadable freeware that might help me out with this?
有谁知道任何开源应用程序,脚本或可下载的免费软件可能会帮助我解决这个问题?
It probably bears mentioning that I'm working on a Windows platform at work, but I am open to suggestions for other operating systems.
可能值得一提的是我在工作的Windows平台上工作,但我对其他操作系统的建议持开放态度。
Cheers!
Update
I have used SQLInform as suggested by Vinko Vrsalovic to excellent effect. Thanks Vinko!
我已经按照Vinko Vrsalovic的建议使用了SQLInform,效果非常好。谢谢Vinko!
Something that might also be worth watching is SQLTidy, a young project on Google Code which could turn into something great in the long run.
可能值得关注的东西是SQLTidy,一个关于Google Code的年轻项目,从长远来看可能会成为一个伟大的东西。
3 个解决方案
#1
2
Some things to try out (SQLinForm is free until 2009). It's weird how some niches totally lack good open source tools.
有些事要尝试(SQLinForm在2009年之前是免费的)。一些利基完全缺乏良好的开源工具,这很奇怪。
http://www.trialpay.com/checkout/?c=bb7014d&tid=6rGUpGo
http://www.fileheap.com/software-universal-sql-editor-download-11096.html
An Emacs macro:
一个Emacs宏:
#2
1
Something else... this freeware tool works for PL/SQL, so maybe there's a use for that in there.
还有别的...这个免费工具适用于PL / SQL,所以也许在那里有用。
PL/SQL Tidy
(Broken Link)
PL / SQL Tidy(Broken Link)
#3
0
Red Gate SQL Refactor (trial) + a Virtual Machine
Red Gate SQL Refactor(试用版)+一台虚拟机
#1
2
Some things to try out (SQLinForm is free until 2009). It's weird how some niches totally lack good open source tools.
有些事要尝试(SQLinForm在2009年之前是免费的)。一些利基完全缺乏良好的开源工具,这很奇怪。
http://www.trialpay.com/checkout/?c=bb7014d&tid=6rGUpGo
http://www.fileheap.com/software-universal-sql-editor-download-11096.html
An Emacs macro:
一个Emacs宏:
#2
1
Something else... this freeware tool works for PL/SQL, so maybe there's a use for that in there.
还有别的...这个免费工具适用于PL / SQL,所以也许在那里有用。
PL/SQL Tidy
(Broken Link)
PL / SQL Tidy(Broken Link)
#3
0
Red Gate SQL Refactor (trial) + a Virtual Machine
Red Gate SQL Refactor(试用版)+一台虚拟机