是否有任何SQL验证程序可以针对多个数据库服务器检查语法? [英] Are there any SQL Validators that can check syntax against multiple database servers?
问题描述
是否有任何SQL验证程序可以针对多个数据库服务器检查语法?
例如,我可能想检查一个特定的查询是否适用于Oracle,MySQL和SQL Server.
与查询的实际架构相比,我更关心SQL语法,因此可以捕获主要语法错误的工具(例如检测到SQL Server和Oracle中不支持limit
子句)就足够了. /p>
有几个答案建议检查特定DBMS或ANSI Standard的语法.
我正在寻找一种针对两个或多个数据库(例如SQL Server和Oracle)之间的某种功能并集的可能性.我希望能够使用我在特定应用程序中定位的所有DBMS支持的任何SQL功能.
我不确定是否值得.我认为这取决于多个数据库共享的非ANSI功能的数量.如果很少,那么以ANSI标准为目标可能会更好.
我不知道具体内容,这些内容将检查这些语句是否有效ansi 92/99/2003 ...
http://developer.mimer.com/validator/index.htm
这将为您提供99%的解决方案(特别是如果仅执行CRUD操作)
也许,如果您知道哪个保留字由哪个数据库使用,则可以滚动自己的简单检查器. 参见: 解决方案
I'm not aware of any that are that specific, these will check that the statements are valid ansi 92/99/2003...
http://developer.mimer.com/validator/index.htm
That will get you 99% of the way there (especially if are only doing CRUD operations)
maybe if you know which reserved words are used by which database you could roll your own simple checker.. see : How to find if a column name is a reserved keyword across various databases
(as already mentioned) If your goal is to create a database agnostic system think about using a third party tool e.g: entityspaces
这篇关于是否有任何SQL验证程序可以针对多个数据库服务器检查语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!