27 lines
416 B
SQL
27 lines
416 B
SQL
-- 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; |