weixin_42754420
weixin_42754420
采纳率25%
2019-01-31 11:11 阅读 610

mysql分页查询语句错误,请大神指点

<select id="selectProCdnMmBdNiNoHiIpSegInfoBrowse"
        resultMap="proCdnMmBdNiNoHiIpSegInfoMap"
        parameterClass="java.util.Map">
        SELECT
        id,
        id_num,
        INET_ATON(start_ip),
        INET_ATON(end_ip),
        type,
        cdn_basic_id,
        cdn_net_id,
        cdn_node_id,
        cdn_house_id,
        FROM
        pro_cdn_mm_bd_ni_no_hi_ip_seg_info
        limit #startRow#,#endRow#
    </select>

报错信息

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM   pro_cdn_mm_bd_ni_no_hi_ip_seg_info   limit 0,10000' at line 1
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.Util.getInstance(Util.java:381)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1356)
    at com.jolbox.bonecp.PreparedStatementHandle.execute(PreparedStatementHandle.java:138)
    at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:185)
    at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
    at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
    ... 41 more
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    caozhy 从今以后生命中的每一秒都属于我爱的人 2019-01-31 11:15

    cdn_house_id,这里的逗号去掉看看

    点赞 评论 复制链接分享
  • qq_18630487 真-酸辣土豆丝 2019-01-31 15:54

    多了个逗号,还有你这个名字起得真他妈长。还有你确定不是“parameterType”“parameterClass”是什么鬼

    点赞 评论 复制链接分享

相关推荐