Re: Difference between = and IN
From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 02/07/05
- Next message: Hugo Kornelis: "Re: Where Statements"
- Previous message: Kuido K?lm via SQLMonster.com: "LIKE or CHARINDEX algoritms"
- In reply to: Andy: "Re: Difference between = and IN"
- Next in thread: Andy: "Re: Difference between = and IN"
- Reply: Andy: "Re: Difference between = and IN"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 07 Feb 2005 21:11:53 +0100
On Mon, 7 Feb 2005 07:19:02 -0800, Andy wrote:
>Hi Hugo
>
>I misunderstood what you meant in the previous post. I have worked out in
>the past that you have to use 'IS [NOT] NULL' rather than '<> Null' (or 'IN
>Null' or '= Null'). I thought you meant that NOT IN (1,2) would return
>strange results if Nulls were present in the records whereas (I believe) NOT
>IN (1,2) would return all rows that did not contain a 1, 2 or Null.
Hi Andy,
That's correct. It's good to see that you know that rows containing NULL
will not be returned be NOT IN (1, 2) - this is also a hefty surprise for
many people!
Best, Hugo
-- (Remove _NO_ and _SPAM_ to get my e-mail address)
- Next message: Hugo Kornelis: "Re: Where Statements"
- Previous message: Kuido K?lm via SQLMonster.com: "LIKE or CHARINDEX algoritms"
- In reply to: Andy: "Re: Difference between = and IN"
- Next in thread: Andy: "Re: Difference between = and IN"
- Reply: Andy: "Re: Difference between = and IN"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|