SQL字符串格式化程序 [英] SQL string formatter

查看:152
本文介绍了SQL字符串格式化程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道一个程序,一个实用程序或一些程序化的库,最好是用于Linux,它采用一个未格式化的SQL字符串,并打印它吗?



例如我想要以下内容:

  select * from users where name ='Paul'



改成这样的东西

  select * 

其中
name ='Paul'

确切的格式不重要。
我只需要一些东西来取一个大的SQL字符串,并把它分解成更可读的。

href =http://www.sqlinform.com/ =noreferrer> http://www.sqlinform.com/

工具重新格式化SQL代码。我用它与真棒的结果。它作为一个web应用程序是免费的,也有一个可下载的版本。


Does anyone know of a program, a utility, or some programmatic library, preferably for Linux, that takes an unformatted SQL string and pretty prints it?

For example I would like the following

select * from users where name = 'Paul'

be changed to something like this

select * 
from users
where
   name = 'Paul'

The exact formatting is not important. I just need something to take a large SQL string and break it up into something more readable.

解决方案

http://www.sqlinform.com/

This tool reformats SQL code. I've used it with awesome results. It's free as a webapp and has a downloadable version as well.

这篇关于SQL字符串格式化程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆