zoukankan      html  css  js  c++  java
  • mybatis报错:Cause: java.sql.SQLSyntaxErrorException: Unknown column 'end_date' in 'field list'

    mybatis报错:Cause: java.sql.SQLSyntaxErrorException: Unknown column 'end_date' in 'field list'

    {"msg":"运行时异常:
    ### Error updating database.  Cause: java.sql.SQLSyntaxErrorException: Unknown column 'end_date' in 'field list'
    
    ### The error may exist in file [E:\zdww\ruoyiProject\ruoyi-system\target\classes\mapper\system\SysEmployeeMapper.xml] ### The
    error may involve com.ruoyi.system.mapper.SysEmployeeMapper.addEmp-Inline ### The error occurred while setting parameters ### SQL:
    insert into sys_employee( emp_name, dept_id, begin_date, end_date, description
    , create_time )values( ?, ?, ?, ?, ?, sysdate()
    ) ### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'end_date' in 'field list' ; bad SQL grammar []; nested exception
    is java.sql.SQLSyntaxErrorException: Unknown column 'end_date' in 'field list'","code":500}

    原因是数据库中没有对应的字段end_date,查询发现我发数据库字段写的是end_time,改过来就对了

  • 相关阅读:
    观察者模式
    工厂模式
    单例模式
    代理模式
    策略模式
    Ioc容器
    Spring概述
    02:入门
    01:背景
    编译原理感悟
  • 原文地址:https://www.cnblogs.com/liqinzhen/p/12986584.html
Copyright © 2011-2022 走看看