EXISTS Predicate [ ALLBASE/SQL Reference Manual ] MPE/iX 5.5 Documentation
ALLBASE/SQL Reference Manual
EXISTS Predicate
An EXISTS predicate tests for the existence of a row satisfying the
search condition of a subquery. The predicate evaluates to TRUE if at
least one row satisfies the search condition of the subquery.
Scope
SQL Data Manipulation Statements
SQL Syntax
EXISTS SubQuery
Parameters
SubQuery A subquery is a nested query. The syntax of
subqueries is presented in the description of the
SELECT statement in the "SQL Statements" chapter.
Description
Unlike other places in which subqueries occur, the EXISTS predicate
allows the subquery to specify more than one column in its select list.
Example
Get supplier names for suppliers who provide at least one part.
SELECT S.SNAME
FROM S
WHERE EXISTS ( SELECT * FROM SP
WHERE SP.SNO = S.SNO );
MPE/iX 5.5 Documentation