0

I want to know how to parse multiple statements in one string.

sqlparser.parseStmt() can only parse one statement.

For example, I have one string:

Create Table tbl1(id bigint); Select * from tbl1;

How to split the string to two SQL statements.

I expect to get a list of SqlNode.

1 Answers1

1

You can use parseStmtList(), a method of the class SqlParser (reference). It returns a SqlNodeList.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77