錯誤代碼: 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