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,
particularly speed, temp disk space consumed (some databases are not
smart on data retrieval and caching), and what records are actually
returned.
Thats like saying you can omit the ORs and ANDs and rewrite the SQL as a
SELECT/UNION query. It is not a simple thing and it wastes man hours
and computer time.


|