2026-04-19 14:50:00 +02:00

27 lines
416 B
Plaintext

-- UNION
select emp_id as person_id
from employee
union
select cust_id as person_id
from customer;
-- UNION ALL
select emp_id as person_id
from employee
union all
select cust_id as person_id
from customer;
-- INTERSECT
select emp_id as person_id
from employee
intersect
select cust_id as person_id
from customer;
-- EXCEPT
select emp_id as person_id
from employee
except
select cust_id as person_id
from customer;