IN predicate

The IN predicate compares a value to a set of values.

It 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 cannot 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)

指出主題類型的圖示 概念主題



時間戳記圖示 前次更新: July 9, 2016 11:11
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=cque_in
檔名:cque_in.html