錯誤碼: 1054 Unknown column 't.createUsrId' in 'group statement',1054t.createusrid

來源:互聯網
上載者:User

錯誤碼: 1054 Unknown column 't.createUsrId' in 'group statement',1054t.createusrid

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...錯誤碼: 1054Unknown 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

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.