合併 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 也會顯示重複項。
廣告
可以用如下 UNION 或 UNION ALL 運算子來實現
select id, Empl_name, DeptId from table1 union select id, Empl_name, DeptId from table2
UNION 與 UNION ALL 的區別在於 UNION 去除重複項,而 UNION ALL 也會顯示重複項。