Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Merge 2 select statements ?

Re: Merge 2 select statements ?

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Fri, 28 Nov 2003 19:44:48 -0500
Message-ID: <ouqfsvsnp46tl55bu3nf1053jsvg3fr31d@4ax.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US