合併 SAP HANA 資料庫中具有相似列名的 2 個表


可以用如下 UNION 或 UNION ALL 運算子來實現

select id, Empl_name, DeptId from table1
union
select id, Empl_name, DeptId from table2

 UNION 與 UNION ALL 的區別在於 UNION 去除重複項,而 UNION ALL 也會顯示重複項。

更新於: 05-12-2019

434 次檢視

開啟你的 職業生涯

完成課程,獲取認證

開始學習
廣告
© . All rights reserved.