即使列存在于mysql表中,也会出现未知列错误

时间:2013-12-25 13:59:50

标签: mysql

select tab1.*(
        select a.*
        from fw_invi a left join fw_resp b on a.id=b.did,
             fw_resp fra left join(
                           select *
                           from fw_type
                          ) tab4 on fra.qaild=tab4.qdetailid //this causing error

      )tab1 left join jos_users u on tab1.consu=u.id order by tab1.createdon desc

在mysql中运行上面的查询我得到以下错误,不应该是这种情况,因为该表中存在指定的缺失列。我认为我正在做错误的嵌套表别名。

Unknown column 'tab4.qdetailid' in 'on clause'

1.为什么即使列存在,我也会收到错误。

2.我的上述查询语法是否正确?

提前致谢。

1 个答案:

答案 0 :(得分:0)

*不能与别名一起使用。别名用于命名列。

相关问题