skip to main content
Supported SQL statements and extensions : Subqueries : IN predicate
  

Try DataDirect Drivers Now

IN predicate

Purpose

The In predicate specifies a set of values against which to compare a result set. If the values are being compared against a subquery, only a single column result set is returned.

Syntax

value [NOT] IN (value1, value2,...)
OR
value [NOT] IN (subquery)

Example

SELECT * FROM emp WHERE deptno IN
(SELECT deptno FROM dept WHERE dname <> 'Sales')