开发者

unknown column in On clause on simple mysql join

It is probably just too late, but I cant wrap my head around what is wrong

This is giving me an unknown column in开发者_运维知识库 ON clause error

SELECT *
FROM abstracts, parts
JOIN parts test ON abstracts.abstract_id = test.abstract_id

But this works perfectly

SELECT *
FROM abstracts, parts
WHERE abstracts.abstract_id = parts.abstract_id

It's a much bigger query, so I can't just use the working example.


This:

SELECT *
FROM abstracts, parts
JOIN parts test ON abstracts.abstract_id = test.abstract_id

Should be:

SELECT *
FROM abstracts JOIN parts
  ON abstracts.abstract_id = parts.abstract_id
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜