Re: 3 value logic. Why is SQL so special?

From: CMCC <c_jackal_at_hotmail.com>
Date: 16 Sep 2006 12:50:11 -0700
Message-ID: <1158436211.525518.298500_at_i3g2000cwc.googlegroups.com>


Cimode wrote:
> David Portas wrote:
> > Chris Lim wrote:
>
> > As Bob already stated, an "outer join" is not really a join. It is
> > SQL's syntax shortcut for a UNION. Obviously the answer to your
> > question depends on the desired result from such a UNION. The user can
> > contrive a query to return whatever values are deemed suitable.
> A UNION equivalent an LEFT OUTER JOIN BULLSHIT!!!. A LEFT OUTER JOIN is
> just SQL miserable way to force a presentation inspired perspective
> into design issues that should be regulated by normalization to
> preserve integrity. The proof is that you can do a UNION using 2
> relations but using LEFT OUTER JOIN when dealing with relations has no
> meaning. Consider 2 tables table1(id1, key1) and table2(id2, key2)
>
> Table1
> 1, A
> 2, B
> 3, C
>
> Table2
> 8, A
> 10, C
>
>

select id1,key1,id2,key2 from Table1 join Table2 on key1=key2 union
select id1,key1,-1,'WHAT?' from Table1 where key1 not in (select key2 from Table2)

Carlos Received on Sat Sep 16 2006 - 21:50:11 CEST

Original text of this message