• 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,改过来就对了

  • 相关阅读:
    collections模块整理
    jQuery 事件
    前端开发问题点
    无线wifi
    MySQL 数据库--SQL语句优化
    MySQL 数据库--索引原理与慢查询优化
    MySQL 数据库--内置功能
    MySQL 数据库--权限管理
    MySQL -Naivacat工具与pymysql模块
    MySQL 数据库 -- 数据操作
  • 原文地址:https://www.cnblogs.com/liqinzhen/p/12986584.html
Copyright © 2020-2023  润新知