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!

union

user497841Aug 12 2010 — edited Aug 13 2010
i have a 2 sql statements with a union.

ex:

select sum(salary) as salary from dept
where dept_id=30
union
select sum(salary) as salary from dept
where dept_id=10

this query would show something like this:

salary
--------
20000
35000

I need the salary to display something like:

salary1 salary2
------------------------
20000 35000


Is this possible?


Thanks for having a look at this!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2010
Added on Aug 12 2010
18 comments
2,064 views