這兩個(gè)都是把查詢結(jié)果合并起來(lái),但是union是合并后刪除重復(fù)行數(shù)據(jù),而union all不刪除。
如:
select * from A
union
select * from B

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