23. 4. 1. IN |
|
The IN operator checks to see if a value is contained in a specified list of values. |
A true result is returned if the value is contained in the list; |
otherwise, the expression evaluates to false. |
The Syntax for IN |
the_value [NOT] IN (value1, value2, value3,...)
|
|
- the_value is the value you are testing, and
- value1, value2, value3,... represents a list of comma-delimited values.
|
Expression | Result | 3 IN (0,1,2,3,) | true | 'Sun' IN ('Mon','Tue') | false | 'Sun' IN ('Sat','Sun') | true | 3 NOT IN (0,1,2,3) | false |
|