4D v14

exists_predicate

Home

 
4D v14
exists_predicate

exists_predicate  


 

 

EXISTS (subquery)

An exists_predicate is used to indicate a subquery and then check whether it returns anything. This is done by passing the EXISTS keyword followed by the subquery.

Example  

This example returns the total sales when there is a store in the region specified:

SELECT SUM (Sales)
FROM Store_Information
WHERE EXISTS
(SELECT * FROM Geography
WHERE region_name = 'West')

 
PROPERTIES 

Product: 4D
Theme: Syntax rules

 
SEE ALSO 

predicate
subquery

 
ARTICLE USAGE

4D SQL Reference ( 4D v11 SQL Release 4 )
4D SQL Reference ( 4D v14)
4D SQL Reference ( 4D v12.1)
4D SQL Reference ( 4D v13.4)
4D SQL Reference ( 4D v14 R2)
4D SQL Reference ( 4D v14 R3)
4D SQL Reference ( 4D v14 R4)