SQL EXISTS Operator
Last updated
Last updated
The EXISTS operator is used to test for the existence of any record in a subquery.
The EXISTS operator returns true if the subquery returns one or more records.
Below is a selection from the "Products" table :
And a selection from the "Suppliers" table:
SQL EXISTS Examples
The following SQL statement returns TRUE and lists the suppliers with a product price less than 20:
The following SQL statement returns TRUE and lists the suppliers with a product price equal to 22: