当前位置:   article > 正文

mybatisplus踩坑:Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column ....

error querying database. cause: java.sql.sqlsyntaxerrorexception: unknown co

1.错误信息如下:

  1. 2024-02-23 16:07:21 [XNIO-1 task-2] DEBUG o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver
  2. - Resolved [org.springframework.jdbc.BadSqlGrammarException: <EOL><EOL>### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column 'created_by' in 'field list'<EOL><EOL>### The error may exist in org/sharetek/warehouse/mapper/Table1Mapper.java (best guess)<EOL><EOL>### The error may involve defaultParameterMap<EOL><EOL>### The error occurred while setting parameters<EOL><EOL>### SQL: SELECT id,warehouse_num,warehouse_name,location,remark,del_flag,created_by,created_on,modified_by,modified_on FROM table1 WHERE del_flag='0' LIMIT ?<EOL><EOL>### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'created_by' in 'field list'<EOL>; bad SQL grammar []]

数据库表如下:

 

 

 

2.正确编码如下:

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/546341
推荐阅读
相关标签
  

闽ICP备14008679号