如何检查(My)SQL语句的语法正确性 [英] How can I check (My)SQL statements for syntactical correctness

查看:469
本文介绍了如何检查(My)SQL语句的语法正确性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们当前正在设置集成服务器,在此过程中,我们在SVN上设置了预提交挂钩,以便我们的开发人员无法检入语法上无效的文件(主要是PHP和XML). /p>

我们还有一堆.sql文件(用于MySQL),我也想整理一下.不幸的是,Google并没有为这项任务提供任何有用的信息.

有什么想法吗?

解决方案

MySQL Workbench的商业版本具有适用于MySQL语句的语法检查器,但当然仅涵盖数据库方面.参见 http://mysql.com/products/workbench/(尽管我在帮助中找到了事实免费应用程序的索引).

we're currently setting up out integration server and during that process we've set up pre-commit hooks on the SVN so that our developers can't check in files that are syntactically invalid (primarily PHP and XML).

We also have a bunch of .sql files (for MySQL) which I'd like to lint as well. Unfortunately, Google didn't turn up anything useful for this task.

Any ideas?

解决方案

The commercial version of MySQL Workbench has a syntax checker for MySQL statements, but of course that would only cover the database aspects. See http://mysql.com/products/workbench/ (though I found the factoid in the help index for the free app).

这篇关于如何检查(My)SQL语句的语法正确性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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