How to test SQL for validity from the command line?

前端 未结 2 1324
花落未央
花落未央 2021-01-18 06:39

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

2条回答
  •  情歌与酒
    2021-01-18 07:02

    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.

提交回复
热议问题