The standard In predicate is supported with a single expression, a list of literal constants or a subquery. That is, it may be used to test whether or not an expression equals another expression, is one of a list of values or is returned from a query. The In predicate generates SQL in one of several forms, shown below.
expression IN expressionexpression IN (literal list) expression IN (literal TO literal) expression IN (subquery) (expression list) IN (subquery)
When dragging an In operator into a variable, the following tree element is created.
A column, expression, literal or SQL Element List can be moved into the (empty -In Test Value) branch of the tree. One or more literals or a single column, expression or Subquery element can be moved into the Expressions folder within the tree. To represent a literal TO literal expression, a SQL Text with Arguments element can be selected from the Other category with text set equal to <P1> TO <P2>, and numeric literals or parameters selected as arguments. Some examples include the following.
expression IN expression
expression IN (literal list)
expression IN (literal list as text)
expression IN (literal TO literal)
expression IN (subquery)
(expression list) IN (subquery)
The use of the ANY predicate with the IN predicate is optional. That is, IN (…), IN ANY (…) and = ANY (…) are all equivalent. If desired, drop an ANY SQL element onto the Expressions folder and then use the Expressions folder under the ANY node.
There are no special properties for the In operator.