错误代码: 1054 Unknown column 't.createUsrId' in 'group statement'


1、错误描写叙述

1 queries executed, 0 success, 1 errors, 0 warnings

查询:select count(t.id),t.`createUserId` from t_acs_ints t where t.id not in (SELECT t1.ionId FROM t_acs_cont t1, t_ac...

错误代码: 1054
Unknown column 't.createUsrId' in 'group statement'

运行耗时   : 0 sec
传送时间   : 0 sec
总耗时      : 0 sec

2、错误原因

     在SQL语句分组时。因为粗心导致字段少写一个字母,导致该字段无法识别(即在表中不存在),致使报错;数据库表的字段名为createUserId,而在group by后面写成了createUsrId


3、解决的方法

     将group by后字段名改动成group by t.createUserId


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM