Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Merge 2 select statements ?
On Thu, 27 Nov 2003 14:49:24 -0600, mhk <cccssss_at_dddsssl.com> wrote:
>select ename, '3' As rate from emp where sal = 950;
>
>other is
>
>select ename, '1' As rate from emp where sal = 11950;
Use UNION:
select ename, '3' As rate from emp where sal = 950
UNION ALL
select ename, '1' As rate from emp where sal = 11950;
Jonathan Gennick --- Brighten the corner where you are http://Gennick.com
Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://four.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body. Received on Fri Nov 28 2003 - 18:44:48 CST