# EXISTS Predicate

A predicate that is true when its subquery returns at least one row.

## What does **EXISTS Predicate** do in a relational database?

**EXISTS Predicate** — A predicate that is true when its subquery returns at least one row.

```sql
SELECT customer_id
FROM customer
WHERE EXISTS (
    SELECT 1
    FROM purchase_order
    WHERE purchase_order.customer_id = customer.customer_id
);
```

Level: Apprentice · [More Database terms at this level](https://www.ask-codey.com/glossary/subjects/database/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/exists-predicate
