Merging 2 tables with similar column name SAP HANA database

SAP HANASAPSAP Basis

This can be done by using UNION or UNION ALL operator as follows

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

 The difference between UNION and UNION ALL is that UNION removes the duplicates while UNION ALL shows duplicates as well.

raja
Published on 14-Dec-2017 10:03:00
Advertisements