Comparison Functions and Operators values the list are sorted and the search for  expr  is done using a binary search, which makes the  IN() operation very quick. IN()  can be used to compare row constructors: You should never mix quoted and unquoted values in an  IN()  list because the comparison rules for quoted values (such as strings) and unquoted values (such as numbers) differ. Mixing types may therefore lead to inconsistent results. For example, do not write an  IN()  expression like this: SELECT val1 FROM tbl1 WHERE val1 IN (1,2,’a’); Instead, write it like this: SELECT val1 FROM tbl1 WHERE val1 IN (’1’,’2’,’a’); Implicit type conversion may produce nonintuitive results: mysql>  SELECT ’a’ IN (0), 0 IN (’b’); -> 1, 1 In both cases, the comparison values are converted to floating-point values, yielding 0.0 in each case, and a comparison result of 1 (true). The number of values in the  IN()  list is only limited by the  max_allowed_packet  value. To comply with the SQL standard,  IN()  returns  NULL  not only if the expression on the left hand side is NULL , but also if no match is found in the list and one of the expressions in the list is  NULL . IN()  syntax can also be used to write certain types of subqueries. See Section 13.2.11.3, “Subqueries with ANY, IN, or SOME” . This is the same as  NOT ( expr  IN ( value ,...)) . Returns  0  if  N  <  N1 ,  1  if  N  <  N2  and so on or  -1  if  N  is  NULL . All arguments are treated as integers. It is required that  N1  <  N2  <  N3  <  ...  <  Nn  for this function to work correctly. This is because a binary search is used (very fast). Tests a value against a boolean value, where  boolean_value  can be  TRUE ,  FALSE , or  UNKNOWN . 2129 • IS  boolean_value • INTERVAL( N , N1 , N2 , N3 ,...) • expr  NOT IN ( value ,...) mysql>  SELECT 2 IN (0,3,5,7); -> 0 mysql>  SELECT ’wefwf’ IN (’wee’,’wefwf’,’weg’); -> 1 mysql>  SELECT (3,4) IN ((1,2), (3,4)); -> 1 mysql>  SELECT (3,4) IN ((1,2), (3,5)); -> 0 mysql>  SELECT INTERVAL(23, 1, 15, 17, 30, 44, 200); -> 3 mysql>  SELECT INTERVAL(10, 1, 10, 100, 1000); -> 2 mysql>  SELECT INTERVAL(22, 23, 30, 44, 200); -> 0