簡體   English   中英

錯誤代碼:1052。IN/ALL/ANY 子查詢中的列 'id' 不明確

[英]Error Code: 1052. Column 'id' in IN/ALL/ANY subquery is ambiguous

    Left join ( select * from crif_stage2 where id in 
    ( select id from  ( select user_id, max(id) as id from
    crif_stage2 group by 1)a)) cf2 on l.user_id = cf2.user_id

編輯:我應該在這個查詢中在哪里添加表名(a)?

左連接 ( select * from crif_stage2 where id in ( select a.id from
( select user_id, max(id) as id from crif_stage2 group by 1) a) ) cf2 on l.user_id = cf2.user_id

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM