Show TOC Start of Content Area

This graphic is explained in the accompanying text Exists predicate  Locate the document in its SAP Library structure

The exists predicate is used to test if a subquery returns any rows.

Syntax

This graphic is explained in the accompanying text

<exists predicate> ::=
             EXISTS '(' <query specification> ')'.

 

The result of the <exists predicate> is true if the result of the <query specification> is not empty (contains one or more rows), otherwise the result of the <exists predicate> is false.

Example

This graphic is explained in the accompanying text

SELECT * FROM a WHERE EXISTS
                ( SELECT * FROM b WHERE b.c = 0 )

The EXISTS Predicate. This query contains an uncorrelated subquery. It returns all rows from table aif there is at least one row in table bfor which the column cof table b has the value 0.

More Information

Query Specification

End of Content Area