Re: SQL Server, Table Joins and Plus notation

From: Mikito Harakiri <mikharakiri_at_iahu.com>
Date: Wed, 22 Dec 2004 16:29:36 -0800
Message-ID: <7voyd.26$Tg5.75_at_news.oracle.com>


"Alejandro Mesa" <AlejandroMesa_at_discussions.microsoft.com> wrote in message news:BD080EDA-29CF-45CC-AE64-DD250CC7A1D3_at_microsoft.com...
> I do not know about any settings in sql server 2000 for what you are
trying
> to do. There is the old style microsoft version for joins (=, *=, =*,
etc.)
> and the ansi style (inner join, left join, right join, etc.). Try to get
use
> to the ansi style because in the future microsoft will not support old
style
> version anymore.

IMO, only left join, right join and full outer join ANSI notation makes sence. Those are operators that don't associate among themselves and don't associate to normal join either. Hence, the notation that emphasises binary operation.

All the others - inner join and natural join - are generalization farts. Cross product is associative and commutes with selection (oops, restriction), which makes comma syntax very intiitive.

For starters, try writing

select * from A,B,C
where a.x+b.y=c.z and b.x+c.y=a.z and c.x+a.y=b.z

in ANSII syntax. Received on Thu Dec 23 2004 - 01:29:36 CET

Original text of this message