Subject Re: Introduction to stored procedures
Author Svein Erling
--- In firebird-support@yahoogroups.com, Jonathan Neve wrote:
>Actually, I must admit that I don't fully understand the
>difference between a join and a left join. The two variants I use
>often are "JOIN" and "LEFT OUTER JOIN". I'm not accustomed to any
>other kind of join. So what exactly does LEFT JOIN mean?

There are basically three kinds of joins (as far as I know):

[INNER] JOIN
LEFT [OUTER] JOIN
FULL [OUTER] JOIN

You may also use RIGHT [OUTER] JOIN, which is basically the same as
the LEFT [OUTER] JOIN. The word INNER and OUTER are optional, so your
LEFT JOIN is a LEFT OUTER JOIN. In an INNER JOIN the records must
exist in both tables, in a LEFT OUTER JOIN the records must exist in
the left table and in a FULL OUTER JOIN the records may exist in
either of the tables or both. Generally, I find INNER JOINs to perform
quickly, LEFT OUTER JOINs to be more complicated from the point of
optimizing a plan, and FULL OUTER JOINs something I am very happy that
I never need to use ;o)

Set
-A member of the Firebird Foundation since long before it became
simple to apply for membership and support Firebird at
http://www.firebirdsql.org/ff/foundation