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!

display all columns with union all

Johnny BFeb 15 2011 — edited Feb 15 2011
Hi All,
select m_id, total, cat_id
from scott.maintenance
where prod_id = 1
union all
select m_id, total, prod_id
from scott.maintenance
where prod_id = 4
How can I display all the columns(common and not) from both tables when I use union all like
m_id, total, cat_id, prod_id

Thanks
Johnny
This post has been answered by Frank Kulash on Feb 15 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2011
Added on Feb 15 2011
5 comments
1,198 views