Subject Re: [firebird-support] JOINs vs WHERE
Author Daniel Rail
Hi,

At March 10, 2004, 05:47, Steffen Heil wrote:

> What are JOINs good for?

Arno's reference is excellent. And, I've added some comments below.

> From what I read, I can do

> select a.avalue, b.bvalue
> from atable a, btable b
> where a.id = b.id

> as

> select a.avalue, b.bvalue
> from atable a join btable b
> on a.id = b.id

> Is there a difference? Until now, I only used the former approch, as it
> seems more "natural" to me.

The join via the WHERE clause is SQL-89(and earlier) standard join
syntax.

The join via the JOIN keyword is how joins are defined in the SQL-92,
SQL-99 and whatever is latest standard.

> I also read about differences between diffent kinds of JOINS [left, inner,
> outer, ..?]
> Is there a good place to read about the differences?

The differences has more to do with SQL standards. If the JOIN
keyword wouldn't have popped up in the SQL standards, it would be most
likely everybody would still be using the WHERE clause to create joins.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)