PostgreSQL:为什么此联接查询会引发语法错误

时间:2019-03-19 10:33:42

标签: postgresql

我不明白,为什么以下查询产生错误。而在其他dbms(例如mysql)中,这种查询是绝对合法的。

ERROR: Syntax error at the end of input
LINE 1: SELECT * FROM "addr_country" AS c JOIN "addr_state" AS s
                                                                ^

SQL state: 42601
Character: 59

在查询中添加子句可使其正常工作:

SELECT * FROM "addr_country" AS c JOIN "addr_state" AS s
ON c."id" = s."country" AND s.id = 10

1 个答案:

答案 0 :(得分:0)

由于this answer,MySQL在<form>无条件的情况下制作了cross join

相关问题