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
1条答案
按热度按时间gajydyqb1#
表名加上反引号就好了; delete
user
,team
from user inner join team on user.id = team.id where user.id = 1 and user.name = 2