| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Null in subquery returns no records
Dawn M. Wolthuis wrote:
> If NULL is considered to an "un" value then at least a three-valued logic
> must be employed to handle the fact that a NULL value is not equal to a NULL
> value, right?
>
The concept of NULL values and equality is foreign to RDBMS. Variables are not equal or unequal to NULL. SQL syntax does not allow:
WHERE variable = NULL
It does allow:
WHERE variable IS NULL
It may seem like a nit picking technicality, but then computer languages are based on nit picking technicalities.
> A null set as the value of a variable is a value equal to another null set
> value.
>
Since we are talking about RDBMS and not pure math please define
what you consider to be a set using relational terminology. The
only entity that Codd defined that contains more than one
value is the table. Tables cannot be NULL. Once they have been
defined their structure exists and therefore they cannot be NULL.
> The relational model itself does not require a three-valued logic and you
> can find Date and others argue in favor of a two-valued logic instead.
There are some who argue that we should have three different types of unknown instead of just one. So what?
> There are numerous databases the employ the much more intuitive two-valued
> logic but I know of no implementations of the relational model that do.
>
If they did they would deviate from Codd's definition.
[ snip ]
Jerry
Received on Mon Feb 09 2004 - 22:51:06 CST
![]() |
![]() |