Comments - 0 not found in WHERE however value is 0

1 year, 3 months ago Ian Gilfillan

The value of the expression (1 OR 0) is 1, which does not match your row.

The IN operator is basically a shorthand for a number of ORs using comma delimitation. I think what you are intending to do is something like:

SELECT count(*) FROM tblArtikelen where 
  ArtikelCode = 7 AND 
    (ArtikelIsVoorraad in (1,0) 
    OR ArtikelIsVoorraad in ('1','0') 
    OR ArtikelIsVoorraad in (TRUE,FALSE)
    );
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.