Predicado IN

El predicado IN compara un valor con un conjunto de valores.

Puede tener uno de los dos formatos:
expression [NOT] IN  ( subselect )
expression [NOT] IN  ( value1, value2,  .... ) 

ValueN puede ser un valor literal o un parámetro de entrada. La expresión no puede evaluarse como un tipo de referencia.

Ejemplo: predicado IN

e.salary IN ( 10000, 15000 )
es equivalente a:
( e.salary = 10000  OR  e.salary = 15000 )
e.salary IN ( select  e1.salary from EmpBean e1 where e1.dept.deptno = 10)
es equivalente a:
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)
es equivalente a:
e.salary <> ALL    ( select  e1.salary from EmpBean e1 where e1.dept.deptno = 10)

Icon that indicates the type of topic Concept topic



Timestamp icon Last updated: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=cque_in
File name: cque_in.html