How to test SQL for validity from the command line?
Asked Answered
O

2

7

Is there a good tool for ensuring that an SQL query is valid ANSI SQL, and optionally what DBMSs will fail to interpret it? I've found http://developer.mimer.com/validator but I was wondering whether there is a command line tool, preferably open source.

Olympian answered 30/12, 2008 at 10:48 Comment(0)
C
2

Here is a SQL Library that can help you to do vendor-specific offline SQL syntax check via command line, both Java and .NET demo were available.

Christian answered 8/1, 2012 at 9:42 Comment(0)
J
1

Maybe a parser/generator like ANTLR or JavaCC has an ANSI SQL 92 grammar already built. If so, you can run the parser/generator, build the classes that come out, and Bob's your uncle.

I see that ANTLR has one that's based on Oracle PL/SQL. Maybe that can help you. ANTLR is a terrific tool, well worth knowing.

Jehoshaphat answered 30/12, 2008 at 14:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.