有哪些免费的 SQL 格式化工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3310188/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What Free SQL Formatting Tools exist?
提问by grady
I want to beautify the SQL Queries I write.
我想美化我写的SQL查询。
What free tools exist that allow for SQL query formatting?
有哪些免费工具允许 SQL 查询格式化?
回答by Tao
PoorMansTSqlFormatteris a free and open-source online beautifier, with offline SSMS Add-In, command-line beautifier tool, and Notepad++ plugin.
PoorMansTSqlFormatter是一款免费开源的在线美化工具,带有离线 SSMS 插件、命令行美化工具和 Notepad++ 插件。
The project aims to format any T-SQL (2000 or later) script, no matter the length or complexity.
该项目旨在格式化任何 T-SQL(2000 或更高版本)脚本,无论长度或复杂性如何。
Hope this helps!
希望这可以帮助!
回答by MicSim
T-SQL Tidyis a very good online SQL formatter/beautifier.
T-SQL Tidy是一个非常好的在线 SQL 格式化程序/美化程序。
It has a lot of formatting options. Though it's targeted to T-SQL, it should work with most SQL dialects.
它有很多格式选项。尽管它针对 T-SQL,但它应该适用于大多数 SQL 方言。
回答by Aaron D
There is a free online Instant SQL Formatter. The site also sells some other versions (add-in for Visual Studio, for example), but the online version is free.
有一个免费的在线Instant SQL Formatter。该站点还出售一些其他版本(例如 Visual Studio 的插件),但在线版本是免费的。
回答by gasman
red Jul 22 '10 at 15:13 @Christopherous 5000
红色 10 年 7 月 22 日 15:13 @Christopherous 5000
I was looking for the same in notepad++ and found a link that gives an idea of how to create your own formatting with macros: http://peoplesoft.wikidot.com/formatting-sql-in-notepad. Seems like it would work, but I'm going to use one of the SSMS Add-ins above. (Less work) Thanks!
我在记事本++中寻找相同的内容,并找到了一个链接,该链接提供了如何使用宏创建自己的格式的想法:http: //peoplesoft.wikidot.com/formatting-sql-in-notepad。看起来它会起作用,但我将使用上面的 SSMS 插件之一。(减少工作)谢谢!
回答by scaryman
I've always been a fan of navicat - http://www.navicat.com
我一直是 navicat 的粉丝 - http://www.navicat.com
Their lite version is free, but it still comes with the sql beautifier - http://www.navicat.com/en/products/navicat_premium/premium_feature.html
他们的精简版是免费的,但它仍然带有 sql 美化器 - http://www.navicat.com/en/products/navicat_premium/premium_feature.html
As an added bonus occasionally you'll find some chinglish hiding in odd places.
作为一个额外的好处,偶尔你会发现一些 CN 式英语藏在奇怪的地方。
回答by Dean
Sequel ProIf using OS X otherwise just work out what you need then develop your query using your knowledge and use the command line tool(my personal favourite:)).
Sequel Pro如果使用 OS X 否则只需找出您需要的内容,然后使用您的知识开发您的查询并使用命令行工具(我个人最喜欢的 :))。