MYSQL join - reference external field from nested select?

Posted by PHP thinker on Stack Overflow See other posts from Stack Overflow or by PHP thinker
Published on 2010-06-10T09:40:32Z Indexed on 2010/06/10 9:42 UTC
Read the original article Hit count: 282

Filed under:
|
|

Is it allowed to reference external field from nested select?

E.g.

SELECT
FROM ext1
LEFT JOIN (SELECT * FROM int2 WHERE int2.id = ext1.some_id ) as x ON 1=1

in this case, this is referencing ext1.some_id in nested select. I am getting errors in this case that field ext1.some_id is unknow. Is it possible? Is there some other way?

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql