expr IN (value,...) : IN : Comparison Functions Operators MySQL TUTORIALS


MySQL TUTORIALS » Comparison Functions Operators » IN »

 

expr IN (value,...)


Returns 1 if expr is equal to any of the values in the IN list, else returns 0.

If all values are constants, they are evaluated according to the type of expr and sorted.

IN returns NULL if the expression on the left hand side is NULL.

IN returns NULL if no match is found in the list and one of the expressions in the list is NULL.

expr NOT IN (value,...) is the same as NOT (expr IN (value,...)).

mysql>
mysql> SELECT IN (0,3,5,7);
+----------------+
IN (0,3,5,7|
+----------------+
|              |
+----------------+
row in set (0.01 sec)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Comparison Functions Operators
» IN