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.

Vikyath Ram
Vikyath Ram

A born rival


Advertisements