On 6 Dec 2017, at 6:07pm, R Smith <[email protected]> wrote:
> You mean make SQLite less Lite, but with Zero computational advantage, by
> simply adding syntactic sugar bloat? - I'm going to have to vote No on that.
> (Luckily my vote counts extremely little.)
I would normally vote with you, but …
> I think the reason SQLite never implemented it is precisely because of the
> fact that it simply amounts to syntactic specialization and no real
> computational advantage.
I did not know how to use LEFT JOIN to do FULL OUTER JOIN. And I didn’t think
it was something simple. Had I ever needed to do FULL OUTER JOIN I’d probably
have done it in my programming language plus two or more SQLite commands.
Supporting RIGHT JOIN, at least, looks to be very simple given that LEFT JOIN
already works. And as SQLite is said to support a lot of SQL92, then
implementing something so simple might be desirable.
Here’s the SQL92 listing for JOIN syntax:
<join type> ::=
INNER
| <outer join type> [ OUTER ]
| UNION
<outer join type> ::=
LEFT
| RIGHT
| FULL
Which reduces to
INNER JOIN
UNION JOIN
LEFT [OUTER] JOIN
RIGHT [OUTER] JOIN
FULL [OUTER] JOIN
Here’s SQLite syntax for join-operator:
[NATURAL] INNER JOIN
[NATURAL] CROSS JOIN
[NATURAL] LEFT [OUTER] JOIN
Should be easy to add RIGHT. Though a lot more work (especially once you
consider testing the numerous possibilities) to add FULL.
Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users