Show TOC

EXISTS Predicate (exists_predicate)Locate this document in the navigation structure

Use

The EXISTS predicate ( exists_predicate) is a predicate that checks whether a result table contains at least one row.

Structure
				
<exists_predicate>::=
  EXISTS <subquery>
				
			

Examples

SQL Tutorial, Subquery: Inner Queries

Explanation

The truth content of an EXISTS predicate is either true or false.

The subquery generates a result table. If this result table contains at least one row, EXISTS <subquery> is true.