Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sum of columns in union query

750281Dec 5 2012 — edited Dec 12 2012
hi, i am using oracle 10g database..

how to get the sum of column in union query ?
     select * from (select 100 records from dual), (select 50 available from dual)
union
select * from (select 200 records from dual), (select 150 available from dual)


display should be like 

                 records         available
                  100               50
                  200               150
 total            300               200
thanks ...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2013
Added on Dec 5 2012
12 comments
4,893 views