INTERSECT

Applies to: sql

INTERSECT returns rows that appear in both query results.

SELECT user_id FROM orders
INTERSECT
SELECT user_id FROM support_tickets;

See also: union, except