WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

IN predicate

The IN predicate compares a value to a set of values and can have one of two forms:
expression [NOT] IN  ( subselect )
expression [NOT] IN  ( value1, value2,  .... ) 

ValueN can either be a literal value or an input parameter. The expression can not evaluate to a reference type.

Example: IN predicate

e.salary IN ( 10000, 15000 )
is equivalent to
( e.salary = 10000  OR  e.salary = 15000 )
e.salary IN ( select  e1.salary from EmpBean e1 where e1.dept.deptno = 10)
is equivalent to
e.salary = ANY   ( select  e1.salary from EmpBean e1 where e1.dept.deptno = 10) 
e.salary NOT IN ( select  e1.salary from EmpBean e1 where e1.dept.deptno = 10)
is equivalent to
e.salary <> ALL    ( select  e1.salary from EmpBean e1 where e1.dept.deptno = 10)



Related concepts
EJB query language
WHERE clause

Related tasks
Using EJB query

Concept topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/cque_in.html

© Copyright IBM Corporation 2002, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)