zoukankan      html  css  js  c++  java
  • JDBC 报错 "SQLException: Column 'addtime' not found",求助!

    <select id="listComntedProdId" resultType="java.util.Map">
    select op.*, oc.comment, oc.score + 0 as score, oc.sid, oc.images, oc.is_show + 0 as is_show, oc.addtime  as comment_addtime
    from onlineshop_comment as oc 
    inner join onlineshop_product as op on oc.goods_id = op.id
    where oc.user_id = #{uid}
    
    order by oc.id DESC
    
    <if test="start >=0 and limit>0"> 
    limit #{start},#{limit} 
    </if> 
    </select>

    在java环境中运行mybatis相关代码,出错

    org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column 'addtime' from result set. Cause: java.sql.SQLException: Column 'addtime' not found.

    后将  “oc.addtime  as comment_addtime” 改为 "oc.addtime" ,报错消失,原因不明,求助!

  • 相关阅读:
    Java EE 和 Java Web
    09-盒模型
    08-层叠性权重相同处理
    07-css的继承性和层叠性
    06-伪元素选择器
    05-伪类选择器
    04-属性选择器
    03-高级选择器
    02-css的选择器
    01-css的引入方式
  • 原文地址:https://www.cnblogs.com/yxmfighting/p/7383760.html
Copyright © 2011-2022 走看看