PDA

View Full Version : What is that I don't see



BubikolRamios
12-05-2011, 01:11 PM
select count(distinct (id_galery)) from galery_optional_inf

select count(distinct(id_galery)) from galery_optional_inf
where id in (77)

select count(distinct(id_galery)) from galery_optional_inf
where id not in (77)

results respectively:
3688
66
3643

What is that I don't see. Numbers are not right ?

EDIT: tested with = and <> intead of using in (), and I get same result. I mean 66 + 3643 <> 3688 !

Old Pedant
12-05-2011, 09:27 PM
NULLs, maybe?