SELECT A.value FROM A oost LEFT JOIN B oo WITH (NOLOCK) ON oost.order_id = oo.id
错误信息:
syntax error, error in :'OCK) ON oost.order_id = oo',expect ON, actual ON pos 99, line 1, column 97, token ON at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:280) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:385) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:78) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.SQLUtils.format(SQLUtils.java:236) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.logging.LogFilter.logExecutableSql(LogFilter.java:569) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.logging.LogFilter.statementExecuteQueryAfter(LogFilter.java:514) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:468) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:182) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228) [druid-1.1.2.jar:1.1.2] at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:688) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:629) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:680) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:712) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:722) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:772) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE]
执行一下语句查询出现错误:
SQL:
SELECT A.value FROM A oost LEFT JOIN B oo WITH (NOLOCK) ON oost.order_id = oo.id
错误信息:
syntax error, error in :'OCK) ON oost.order_id = oo',expect ON, actual ON pos 99, line 1, column 97, token ON at com.alibaba.druid.sql.parser.SQLParser.printError(SQLParser.java:280) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:385) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:78) ~[druid-1.1.2.jar:1.1.2] at com.alibaba.druid.sql.SQLUtils.format(SQLUtils.java:236) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.logging.LogFilter.logExecutableSql(LogFilter.java:569) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.logging.LogFilter.statementExecuteQueryAfter(LogFilter.java:514) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:468) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:182) [druid-1.1.2.jar:1.1.2] at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228) [druid-1.1.2.jar:1.1.2] at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:688) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:629) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:680) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:712) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:722) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:772) [spring-jdbc-4.2.2.RELEASE.jar:4.2.2.RELEASE]