druid Mysql delete join解析报错

093gszye  于 4个月前  发布在  Druid
关注(0)|答案(1)|浏览(72)

SQL:
delete user, team from user inner join team on user.id = team.id where user.id = 1 and user.name = 2;

Failure Trace:
com.alibaba.druid.sql.parser.ParserException: syntax error. pos 11, line 1, column 7, token USER
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseDeleteStatement(MySqlStatementParser.java:191)
at com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser.parseDeleteStatement(MySqlStatementParser.java:47)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:173)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:72)
at com.alibaba.druid.sql.SQLUtils.parseStatements(SQLUtils.java:464)
at gllue.middleware.sql.parser.SQLParserUtils.parse(SQLParserUtils.java:25)
at gllue.middleware.sql.parser.SQLParserUtils.parseSingle(SQLParserUtils.java:29)
at

gajydyqb

gajydyqb1#

表名加上反引号就好了; delete user, team from user inner join team on user.id = team.id where user.id = 1 and user.name = 2

相关问题