我不明白,为什么以下查询产生错误。而在其他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