× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 7/15/22 10:40 AM, jerry ven wrote:
For the below statement :-

"They simply are not the same and would give different results depending on what you want back. "

Does it refer with respect to 'INNER JOIN' and 'JOIN' ? or
does it refer to 'LEFT OUTER JOIN' and 'RIGHT OUTER JOIN ' here
?

Actually, it applies to all of the above.

I keep a copy of the 2003 edition of Allen G. Taylor's "SQL for Dummies"
on my desk. I highly recommend that anybody who is not already an SQL
expert look into buying a copy of the current edition.

Consider an inner join. There may be records in the first table ("left"
by convention) that have no corresponding records in the second table
("right" by convention). And vice versa. An inner join omits the records
that don't have counterparts. (Paraphrased from Page 211 of the Dummies
book on my desk.)

Quoting directly from the Dummies book, page 211,

The *left outer join* preserves unmatched rows from the left table but discards unmatched rows from the right table.

The book goes on to explain that for the "left" records that have no
corresponding records on the "right," the "right" fields are simply
nulled out.

Going on to the bottom of page 213,

I bet you figured out how the right outer join behaves. Right! The *right outer join* preserves unmatched rows from the right table but
discards unmatched rows from the left table.

There is also such a thing as a *full outer join* that preserves all of the unmatched records.

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.