How can I check the SQL syntax in a .sql file?

后端 未结 7 1407
走了就别回头了
走了就别回头了 2021-02-03 23:20

How can I check the SQL syntax in a .sql file?

7条回答
  •  甜味超标
    2021-02-03 23:40

    The basic lexer seems to be implemented in sql/sql_lex.cc. You could use/salvage this to build your own test parser. But this would only check for syntax but not any runtime errors.

    edit: For MySQL 8.0+ see How can I check the SQL syntax in a .sql file?

提交回复
热议问题