Got it, so -

, == CROSS JOIN
JOIN == INNER JOIN
LEFT JOIN == LEFT OUTER JOIN == OUTER JOIN

And NATURAL just is just shorthand for matching on same-name rows.

Thanks for the prompt response and detailed explanation, it's very much
appreciated!

Cheers,
Andrey

On Tue, Apr 21, 2009 at 2:57 PM, Griggs, Donald <
[email protected]> wrote:

>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Andrey Fedorov
> Sent: Tuesday, April 21, 2009 1:27 PM
> To: [email protected]
> Subject: [sqlite] Difference between all the joins
>
> Hi all,
> According to the join-op syntax [1], SQLite has 13 distinct join
> statements:
>
> ,
> JOIN
> LEFT JOIN
> OUTER JOIN
> LEFT OUTER JOIN
> INNER JOIN
> CROSS JOIN
> NATURAL JOIN
> NATURAL LEFT JOIN
> NATURAL OUTER JOIN
> NATURAL LEFT OUTER JOIN
> NATURAL INNER JOIN
> NATURAL CROSS JOIN
>
> Are they all unique? Which are equivalent?
>
> - Andrey
>
> 1. http://sqlite.org/syntaxdiagrams.html#join-op
> _______________________________________________
> _______________________________________________
> _______________________________________________
>
> Hello, Andrey,
>
> No, many are synonyms included (I think) as part of the SQL standards or
> to ease conversion from various other SQL dialects.
>
> E.g. an "unadorned" JOIN is identical to an INNER JOIN.   Inner joins
> have no "left" or "right" so a LEFT JOIN can be used as a synonym for a
> LEFT OUTER JOIN.  Furthermore, LEFT is a default for OUTER JOINS, so
> OUTER JOIN == LEFT JOIN == LEFT OUTER JOIN.
>
> This article looks interesting:  http://en.wikipedia.org/wiki/Join_(SQL)
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to