Hellihello Vinzenz,
SELECT * FROM t1 LEFT JOIN (t2, t3, t4)
ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)<zitat>
The syntax of table_factor is extended in comparison with the SQL Standard.
The latter accepts only table_reference, not a list of them inside a pair
of parentheses
</zitat>Vermeide diese Syntax.
Will ich nur Beispiel 1 oder 2?
Was verstehst Du unter Beispiel 1 oder 2?
2 war das zweite:
SELECT * FROM t1 LEFT JOIN (t2 CROSS JOIN t3 CROSS JOIN t4)
ON (t2.a=t1.a AND t3.b=t1.b AND t4.c=t1.c)
Du brauchst den LEFT JOIN, wenn Du einen LEFT JOIN benötigst (oder einen RIGHT JOIN). Niemand benutzt RIGHT JOINs :-)
Siehst du, woher weiß ich, dass niemand RIGHT JOINS nutzt?
wenn da steht: "CROSS JOIN is a syntactic equivalent to INNER JOIN"?
das ist MySQL-spezifisch. Lies Rouvens Beitrag nochmals. Was ist ein Kreuzprodukt?
Na, da könnte ich ja einfach erstmal den INNER JOIN nehmen (wenn das das selbe wie CROSS JOIN ist), der ja im Gegensatz zum LEFT JOIN nur Zeilen anzeigt, die gefüllte Werte enthalten.
Ein LEFT JOIN liefert *ganz andere* Ergebnisse als ein INNER JOIN. Lies meinen Beitrag nochmals. Lies bitte dieses Archivposting.
Jau, s.o., dem komm ich jetz näher.
Dank und Gruß,