Re: Difference between = and IN
From: Andy (Andy_at_discussions.microsoft.com)
Date: 02/08/05
- Previous message: Hugo Kornelis: "Re: select count (distinct X, Y)"
- In reply to: Hugo Kornelis: "Re: Difference between = and IN"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Feb 2005 03:31:03 -0800
Hi Hugo
That's a relief I didn't fancy having to re-check all my databases!!! Its
also nice to know I'm not a complete eejit!
Thanks for your help
Andy
"Hugo Kornelis" wrote:
> 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)
>
- Previous message: Hugo Kornelis: "Re: select count (distinct X, Y)"
- In reply to: Hugo Kornelis: "Re: Difference between = and IN"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|