程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> druid-sql報錯,求大神幫忙看看,在線等!

druid-sql報錯,求大神幫忙看看,在線等!

編輯:編程綜合問答
sql報錯,求大神幫忙看看,在線等!

Caused by: java.sql.SQLException: sql injection violation, syntax error: TODO : LITERAL_INT top : select top 20 * from (select row_number() over ( order by name asc ) row_number, * from (select id,name,display_Name,type,instance_Url,state, content, version,create_Time,creator from wf_process where 1=1 and state = ? ) aa ) a where row_number > 0 order by row_number
at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:711)
at com.alibaba.druid.wall.WallFilter.connection_prepareStatement(WallFilter.java:240)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:928)
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:928)
at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122)
at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:448)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:318)
at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1436)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:581)
... 126 more
Caused by: com.alibaba.druid.sql.parser.ParserException: TODO : LITERAL_INT top
at com.alibaba.druid.sql.dialect.oracle.parser.OracleStatementParser.parseStatementList(OracleStatementParser.java:490)
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:112)
at com.alibaba.druid.wall.WallProvider.checkInternal(WallProvider.java:619)
at com.alibaba.druid.wall.WallProvider.check(WallProvider.java:574)
at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:699)
... 138 more

最佳回答:


ORACLE 沒有 SELECT TOP 語句,要用行號作為條件進行過濾

    select *
      from (select row_number() over ( order by name asc ) row_number,
                   *
              from (select id,name,display_Name,type,instance_Url,state, content, version,create_Time,creator
                      from wf_process
                     where 1=1
                      and state = ?
                   ) aa
           ) a
     where row_number BETWEEN 1 AND 20
  order by row_number
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved