Subject | Join order |
---|---|
Author | Datatal AB - Gauffin, Jonas |
Post date | 2003-08-28T07:24:24Z |
In wich order are joins made:
SELECT * FROM table1 t1 LEFT JOIN t2 ON (t1.key1=t2.key2) LEFT JOIN t3
ON (t1.key2=t3.key1)
t1 and t2 are joined first, and then t3 are joined by the result of
t1+t2, right?
SELECT * FROM table1 t1 INNER JOIN t2 ON (t1.key1=t2.key2) LEFT JOIN t3
ON (t1.key2=t3.key1)
Same order as the first statement, right?
Next question. Will there be support for the USING keyword in joins?
SELECT * FROM table1 t1 LEFT JOIN t2 ON (t1.key1=t2.key2) LEFT JOIN t3
ON (t1.key2=t3.key1)
t1 and t2 are joined first, and then t3 are joined by the result of
t1+t2, right?
SELECT * FROM table1 t1 INNER JOIN t2 ON (t1.key1=t2.key2) LEFT JOIN t3
ON (t1.key2=t3.key1)
Same order as the first statement, right?
Next question. Will there be support for the USING keyword in joins?