假设:
A中有:苹果🍎、水蜜桃🍑
B中有:苹果🍎、菠萝🍍
union all直接合并
(select * from A) union all (select * from B)
得到:苹果🍎、水蜜桃🍑、苹果🍎、菠萝🍍
union去重合并
(select * from A) union (select * from B)
得到:苹果🍎、水蜜桃🍑、菠萝🍍
假设:
A中有:苹果🍎、水蜜桃🍑
B中有:苹果🍎、菠萝🍍
union all直接合并
(select * from A) union all (select * from B)
得到:苹果🍎、水蜜桃🍑、苹果🍎、菠萝🍍
union去重合并
(select * from A) union (select * from B)
得到:苹果🍎、水蜜桃🍑、菠萝🍍