Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Query Clarification.

Re: Query Clarification.

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 30 Oct 2005 07:43:40 +0100
Message-ID: <43646b9c$0$22503$636a15ce@news.free.fr>

<cybotto_at_yahoo.com> a écrit dans le message de news: 1130653256.986100.151560_at_g43g2000cwa.googlegroups.com...
|
| Comparing NULL = NULL, NULL <> NULL, NULL > NULL, etc. will always
| result in false ...
|

This is not true, these conditions return UNKNOWN and not FALSE. Oracle works on a trivalue logic.

SQL> begin
  2 if '' = '' then dbms_output.put_line('equal is TRUE');   3 elsif not ('' = '') then dbms_output.put_line('equal is FALSE');   4 else dbms_output.put_line('equal is NEITHER true nor false');   5 end if;
  6 end;
  7 /
equal is NEITHER true nor false

PL/SQL procedure successfully completed.

A select returns rows that returns TRUE for the where clause. All rows that return FALSE or UNKNOWN are discarded. This is a litlle confusing but logic.

Regards
Michel Cadot Received on Sun Oct 30 2005 - 01:43:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US