SELECT *
FROM
daaddress ad,
(daname nam LEFT OUTER JOIN daenttonam etn on nam.entity_id = etn.entity_id)
我不明白用逗号分隔的两个“表”应该没有JOIN语句。这是一个完整的吗?
答案 0 :(得分:3)
它在daadress
和LEFT JOIN
daname
和daenttonam
之间输出笛卡尔积。
使用JOIN
语法,可以将其重写为:
SELECT *
FROM daaddress ad
CROSS JOIN
(
daname nam
LEFT OUTER JOIN
daenttonam etn
ON nam.entity_id = etn.entity_id
)
parens可能会被省略:
SELECT *
FROM daaddress ad
CROSS JOIN
daname nam
LEFT OUTER JOIN
daenttonam etn
ON nam.entity_id = etn.entity_id
很难说它的目的是不了解模型细节。