Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    2,116
    Thanks
    120
    Thanked 79 Times in 79 Posts

    What is that I don't see

    Code:
    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 !
    Last edited by BubikolRamios; 12-05-2011 at 01:33 PM.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  2. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    29,698
    Thanks
    93
    Thanked 4,947 Times in 4,908 Posts
    NULLs, maybe?
    Be yourself. No one else is as qualified.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •