IN
Description
The IN operator is used to check whether a specified value (elem) is in a given list of expressions (expr1, expr2, ...) or query results. If elem is equal to any value in the list or any value in the query results, it returns true; otherwise, it returns false.
Parameter Description
elem
: An expression that returns a comparable type.exprN
: Expressions of the same type as elem, can be multiple, separated by commas.query
: A query statement that returns the same type as elem. The current version only supports queries that return a single column result.
Return Type
The return type is a boolean.
Usage Example
- Check if the number 1 is in the given list (1, 2, 3): Sure, here is the translated content:
Notes
- Please ensure that the types returned by elem and exprN or query match, otherwise it may lead to comparison failure.
- When using the IN operator with subqueries, please ensure that the subquery returns only one column of results.