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

From: David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org>
Date: 16 Sep 2006 07:11:03 -0700
Message-ID: <1158415863.788233.119450_at_e3g2000cwe.googlegroups.com>


Chris Lim wrote:

>

> In a database without NULLs, would you have to do LEFT OUTER JOINs in
> all queries where you want all rows from your 'main' table returned,
> regardless of whether they have the optional attributes or not? Say,
> for example, all flights, with or without an actual departure time. And
> if so, how do the 'missing' attributes get returned from these queries,
> if NULLs are not allowed?

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.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Received on Sat Sep 16 2006 - 16:11:03 CEST

Original text of this message