Merging 2 tables with similar column name SAP HANA database


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.

Updated on: 05-Dec-2019

364 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements