錯誤碼: 1066 Not unique table/alias: 'c',1066unique

來源:互聯網
上載者:User

錯誤碼: 1066 Not unique table/alias: 'c',1066unique

1、錯誤描述

1 queries executed, 0 success, 1 errors, 0 warnings查詢:SELECT (SELECT CONCAT( s.name, '/', sr.reame, '[', DATE_FORMAT(a.startTime, '%Y-%m-%d'), ']' ) FROM t_stu_info a, t_...錯誤碼: 1066Not unique table/alias: 'c'執行耗時   : 0 sec傳送時間   : 0 sec總耗時      : 0.001 sec

2、錯誤原因

     在拼接SQL語句時,給t_stu_amount 和t_tea_info 取別名時,都取c

     ... from t_stu_info a,t_stu_amount c,t_tea_info c

     導致資料庫表別名重複


3、解決辦法

     將兩個表的別名改為不一樣的,如 ... from t_stu_info a,t_stu_amount c,t_tea_info o

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

相關文章

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.