Parsing SQL string

前端 未结 5 1078
我寻月下人不归
我寻月下人不归 2021-01-21 08:44

What is a good method for parsing an sql string into it separate components. I\'v tried with a regex, however I can\'t get it to work just right.

Say for instance:

5条回答
  •  被撕碎了的回忆
    2021-01-21 09:29

    Parsing SQL correctly and completely is hard. For free you could use a parser generator toolkit like ANTLR along with a SQL 'grammar'. For cost, I know that Visual Studio Team System 2008 Database Edition includes a SQL parser.

提交回复
热议问题