這兩個都是把查詢結果合并起來,但是union是合并后刪除重復行數據,而union all不刪除。
如:
select * from A
union
select * from B

--
select * from A
union all
select * from B