手动,我有这样的查询我的sql:你的SQL语法有错误;检查对应于你的MySQL服务器版本正确的语法使用近'
select c.*,j.pict
from mst020 a
inner join mst022 c on c.mst020_id = a.id
left join (select e.pict as pict from mst021 e
where e.line_number =
(select max(f.line_number) from mst021 f where f.mst020_id = a.id)
and e.mst020_id = a.id) j
但是当我处理该查询,,错误显示:
你的SQL语法有错误;检查对应于你的MySQL服务器版本的在线使用近“” 5
我试图因为甲骨文学会我的SQL它不是problme当G有子查询像that.thx正确的语法手册
派生表必须haave一个别名:(从mst021 E选择e.pict为PICT其中e.line_number =(从mst021 f选择最大值(f.line_number)其中f.mst020_id = a.id)* * AS tmp ** –
您需要在'left join'后使用表格 – Alex
嗯我已经尝试过,但仍然错误.. –