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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Does it have a sence?

Re: Does it have a sence?

From: Sybrand Bakker <sybrandb_at_hccnet.nl>
Date: Mon, 31 Jan 2005 18:33:54 +0100
Message-ID: <6rqsv0pm1s89lf4p8g97vssjq2f20c5u3f@4ax.com>


On 31 Jan 2005 09:26:13 -0800, y1799_at_yahoo.com wrote:

>does the last two lines of the query have sense?
>
>SELECT a.f1, a.f2, b.f1, b.f2FROM a, b
>WHERE a.f1 = b.f1
>AND a.f2 = b.f2
>AND nvl(a.f2, '!') <> nvl(b.f2, '!')
>Thanks,
>
>P.S. It is not student work .

They don't.
If either column is NULL the result will be NULL because of the first = predicate.
If they are not equal the result will be FALSE according to the first = predicate
If they are equal the result will be FALSE because of the second predicate.
The query won't provide any result (apart from the fact the first line has a lacking space between f2 and FROM)

--
Sybrand Bakker, Senior Oracle DBA
Received on Mon Jan 31 2005 - 11:33:54 CST

Original text of this message

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