For AI agents: an index of this documentation is at https://developer.rippling.com/llms.txt. Public pages have a Markdown version at the same URL with .md added.

Skip to main content
index

EXISTS() Function

Use with AI:Rippling AI ChatGPT Claude Cursor

Description​

Tests whether a subquery returns any rows.

Syntax​

EXISTS(subquery)

Parameters​

ParameterDescriptionData TypeRequired
subqueryThe subquery argumentSubqueryYes

Example​

SELECT
id
FROM
rippling.employee.Employee e
WHERE
EXISTS (SELECT 1 FROM rippling.employee.Employee m WHERE m.manager_id = e.id);