关于sql的格式化问题.

 SQL格式化工具-SQL Pretty Printer

http://dddspace.com/2010/07/sql-format-tool-sql-pretty-printer.html

背景

最近写了一些SQL,数据库用的是MS-SQL,而SQL Server Management Studio是不自带代码格式化功能的,这让我用起来很郁闷,PL/SQL Developer格式起来多爽啊。

在网上找了一下SQL格式化工具,只有一个用起来还不错的在线版本,我测试了一下,功能强大,可惜不支持中文,注释的中文会被打上??

SQL Pretty Printer

我在那个在线网站看到了Desktop Version的菜单,进去一看,哦,原来这个网站本身就在做一款SQL格式化工具的产品,叫做 SQL Pretty Printer。

SQL Pretty Printer 的桌面版本

格式化好之后的代码

功能

SQL Pretty Printer目前提供4种使用方式,桌面版本,SSMS(SQL Server Management Studio)插件,VS插件,和提供API接口。

SSMS(SQL Server Management Studio)插件版本

可以将SQL转化成代码格式,支持数种语言

可以将SQL转化成HTML格式

获取

使用版本只能提供30次,而且桌面版本的无法将代码复制出来,我使用的是SSMS插件版本,可以直接在查询器里面格式化,试用版的限制比较多。

翻遍SQL Pretty Printer的网站,终于发现了Get SQL Pretty Printer Desktop Version For Free信息,作者说可以通过4种途径获取免费的授权码。

  • 1.If you are a technical/software blogger or journalist willing to write us up (honest reviews are the most useful to us) email us a short blurb with the link to your blog and we'll send you a license, FREE of charge, so that you can evaluate sql pretty printer properly.
  • 2.If you are willing to demo SQL Pretty Printer to an audience of at least 15 people (at a user group, a conference, a BarCamp), email us your info and we'll give you two licenses, one for you to keep and one to give away at the event, FREE of charge.
  • 3.If you teach a high-school class, email us the name of your school and your class, plus the number of students in your class. We will send you a license for all of them.
  • 4.A note to university students and professors: we currently do not offer free licenses to universities, but we'll be happy to offer you an additional 50% off any orders of 10 or more licenses. Let us know if you're interested and we'll set up a discount code for you.

很幸运,我有自己的软件博客,写完这篇文章之后,我就会向作者发出申请邮件。

最后

说说这个软件的弊病吧,那就是功能太单一。现在大部分的查询器都有格式化功能,只是M$这边没有加入这个功能,从该软件的产品线来看,很依赖于SSMS和VS,一旦他们加入格式化功能,这个软件的使用价值就大大降低了。

Links

下载链接:http://www.dpriver.com/dlaction.php
在线版本(不支持中文):http://www.dpriver.com/pp/sqlformat.htm
获取免费的授权码:http://www.dpriver.com/products/sqlpp/getforfree.php

Others

WP Keyword Link这个插件在更新到版本 1.5.2之后会让正文中图片无法显示,出现类似http://dddspace\.com/****的URL,导致图片显示失败,停用这个插件之后即可,期待作者下个版本修复这个问题。

Update-2010-7-29

下午作者就给了答复,问我要哪一个版本的Key,第二天早晨拿到了SSMS版本的Licence。作者叫James Wang,而且工作组叫GuduSoft,我怀疑作者是华人

再次感谢作者的慷慨~

版权所有 © 2010 转载本站文章请注明: 转载自Log4D
原文链接: http://dddspace.com/2010/07/sql-format-tool-sql-pretty-printer.html
您可以随意地转载本站的文章,但是必须在醒目位置注明来源及本站链接,不可以将本站文章商业化使用,或者修改、转换或者以本作品为基础进行创作。
3a1ff193cee606bd1e2ea554a16353ee

 

 

好用的線上 SQL 格式化工具

 

我覺得 Management Studio 有個缺陷,就是沒有 SQL 格式化工具,每次透過 Query Builder 產生出來的 SQL Code 其醜無比!

所以我就找了幾個好用的格式化工具:

Instant SQL Formatter
http://www.dpriver.com/pp/sqlformat.htm

SQLinForm ( 推薦使用!但瀏覽器要能支援 Java 才能執行 )
http://www.sqlinform.com/

Demo of SQL Formatter Web Service
http://www.gudusoft.com/sqlformatter.aspx

SQL and PL/SQL Formatter
http://www.orafaq.com/cgi-bin/sqlformat/pp/utilities/sqlformatter.tpl

General SQL Parser (commerical)
http://www.sqlparser.com/

SQL Pretty Printer: beautify the mess sql code instantly!
http://www.wangz.net/sqlpp.php

    SQL Pretty Printer Add-In for SQL Server Management Studio
    http://www.wangz.net/sqlpp_ssms.php

    SQL Pretty Printer Add-In for Visual Studio
    http://www.wangz.net/sqlpp_vs.php

    Instant SQL Formatter
    http://www.wangz.net/cgi-bin/pp/gsqlparser/sqlpp/sqlformat.tpl

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值