![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Out of curiosity, can every LEFT JOIN be rewritten as a query with RIGHT JOINs? It seems to me that if you just take the "leftmost" table and use that in the FROM part of a SELECT that all subsequent LEFT JOINs would need to be RIGHT JOINs... |
#3
| |||
| |||
|
|
Out of curiosity, can every LEFT JOIN be rewritten as a query with RIGHT JOINs? It seems to me that if you just take the "leftmost" table and use that in the FROM part of a SELECT that all subsequent LEFT JOINs would need to be RIGHT JOINs... |
#4
| |||
| |||
|
|
Out of curiosity, can every LEFT JOIN be rewritten as a query with RIGHT JOINs? It seems to me that if you just take the "leftmost" table and use that in the FROM part of a SELECT that all subsequent LEFT JOINs would need to be RIGHT JOINs... |
#5
| |||
| |||
|
|
can every LEFT JOIN be rewritten as a query with RIGHT JOINs? |
#6
| |||
| |||
|
|
can every LEFT JOIN be rewritten as a query with RIGHT JOINs? |
#7
| |||
| |||
|
|
can every LEFT JOIN be rewritten as a query with RIGHT JOINs? |
#8
| |||
| |||
|
|
yawnmoth wrote: Out of curiosity, can every LEFT JOIN be rewritten as a query with RIGHT JOINs? It seems to me that if you just take the "leftmost" table and use that in the FROM part of a SELECT that all subsequent LEFT JOINs would need to be RIGHT JOINs... LEFT and RIGHT joins dictate precedence of the tables/queries. You could do it either way, but what data you get back will be different. If you do as you say, it is not merely changing the LEFT to a RIGHT, you are changing the entire SQL query. This can cause unforeseen problems, [...] are actually returned. |
#9
| |||
| |||
|
|
yawnmoth wrote: Out of curiosity, can every LEFT JOIN be rewritten as a query with RIGHT JOINs? It seems to me that if you just take the "leftmost" table and use that in the FROM part of a SELECT that all subsequent LEFT JOINs would need to be RIGHT JOINs... LEFT and RIGHT joins dictate precedence of the tables/queries. You could do it either way, but what data you get back will be different. If you do as you say, it is not merely changing the LEFT to a RIGHT, you are changing the entire SQL query. This can cause unforeseen problems, [...] are actually returned. |
#10
| |||
| |||
|
|
yawnmoth wrote: Out of curiosity, can every LEFT JOIN be rewritten as a query with RIGHT JOINs? It seems to me that if you just take the "leftmost" table and use that in the FROM part of a SELECT that all subsequent LEFT JOINs would need to be RIGHT JOINs... LEFT and RIGHT joins dictate precedence of the tables/queries. You could do it either way, but what data you get back will be different. If you do as you say, it is not merely changing the LEFT to a RIGHT, you are changing the entire SQL query. This can cause unforeseen problems, [...] are actually returned. |
![]() |
| Thread Tools | |
| Display Modes | |
| |