On Sun, Jan 8, 2017 at 12:46 PM, Keith Medcalf <kmedc...@dessus.com> wrote:

>
> ... join ... using (column) has nothing whatever to do with foreign keys.
>
> "FROM a JOIN b USING (c) is "syntactic sugar" ([...]) for the expression
> "FROM a, b WHERE a.c = b.c"
>

Or "FROM a JOIN b ON a.c = b.c".
Or "FROM a INNER JOIN b ON a.c = b.c".

Syntax does matter (to some?) for readability and comprehension of a query
IMHO.

I prefer to keep my WHERE clauses for single-table "filtering",
and rely on JOIN-ON for how two tables "connect" during a join.
(which columns to "thread the needle through" to form/constitute
a "multi-table row" is my personal mental image of a join).

My $0.02. --DD

PS: I myself consider "FROM a, b WHERE a.c = b.c" to be the "legacy"
syntax, best avoided :)
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to