You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version

来源:互联网 发布:深入java虚拟机 第四版 编辑:程序博客网 时间:2024/04/27 12:44
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 'student_id = '2015210992'

        AND insurance_id = 2' at line 6

我出现这个异常提示的原因很奇葩,下面是出错的代码:

    <select id="selectByPrimaryKey" parameterType="studio.geek.entity.StudentInsuranceKey" resultMap="BaseResultMap">        SELECT        <include refid="Base_Column_List"/>        FROM student_insurance        WHENECER student_id = #{studentId,jdbcType=CHAR}        AND insurance_id = #{insuranceId,jdbcType=SMALLINT}    </select>


在红色标注的部分,原本是WHERE,结果写成了WHENEVER。我一直都在查找参数的问题,结果竟然是因为这个。

0 0
原创粉丝点击