我需要将查询转换为 postgresql。我精确这个查询适用于mysql。
UPDATE cache_implementation n
INNER JOIN cache_compared compared ON n.compared_id = compared.nid
LEFT JOIN cache_implementation ncp ON (compared.parent_id = ncp.compared_id AND n.feature_id = ncp.feature_id)
INNER JOIN cache_feature feature ON n.feature_id = feature.nid
LEFT JOIN cache_implementation nfp ON (feature.parent_id = nfp.feature_id AND n.compared_id = nfp.compared_id)
SET n.parent_through_compared_id = ncp.nid, n.parent_through_feature_id = nfp.nid
当我尝试执行它时,在第 2 行附近出现语法错误:INNER JOIN cache_compared 比较 ON n.com...
感谢您的帮助。