明示的な結合を使用した sql の正しい構文を理解するのに問題があります。たとえば、最初のスニペットでは、2 番目の結合で「ec」が表示され、制限が機能します。しかし、2 番目のスニペットでは「op」を解決できません。
最初のスニペット:
select im.*
from gestion_corte gc
join evento_corte ec
on ec.id_corte = gc.id_corte
join op_corte op
on op.id_corte = gc.id_corte
and op.fecha_evento = ec.fecha_evento
join img_corte im
on op.id_corte = im.id_corte
where ec.fecha_evento > '01092012'
2 番目のスニペット、「op」は最初の結合で解決できません:
select im.*
from gestion_corte gc
join evento_corte ec
on ec.id_corte = gc.id_corte
and op.fecha_evento = ec.fecha_evento -- This condition has moved
join op_corte op
on op.id_corte = gc.id_corte
join img_corte im
on op.id_corte = im.id_corte
where ec.fecha_evento > '01092012'
その結果、可視性は上から下への処理で解決されますか? 他に考慮すべき重要なことはありますか?