Reputation: 1704
Hello I want merge two tables in oracle like below -
I tried below answer from stack overflow but not getting answer like Output table
Combining Two Tables With Oracle SQL
Upvotes: 0
Views: 1122
Reputation: 5588
Please try with below query:
select * from (
select id, name, rate,total from table1
union all
select id, name, rate,total from table2
) as t
order by t.id asc
Upvotes: 1
Reputation: 37473
use union all
select id, name, rate,total from table1
union all
select id, name, rate,total from table2
Upvotes: 1