The IN() function can be used to test one value against a number of possible values. : IN « Function « SQL / MySQL






The IN() function can be used to test one value against a number of possible values.

    
mysql>
mysql> SELECT 'a' IN ('b','c','a');
+----------------------+
| 'a' IN ('b','c','a') |
+----------------------+
|                    1 |
+----------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
  








Related examples in the same category

1.IN operator.
2.IN and NOT IN operators provide the most flexibility when comparing values to the results returned by a subque
3.Several different values can be written more easily by using the IN( ) operator.