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: MIN value from a column in 2 tables.

Re: MIN value from a column in 2 tables.

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 20 Jan 2003 19:09:54 -0800
Message-ID: <130ba93a.0301201909.23271653@posting.google.com>


This should do it:

select min(ID) from (select * from table1 union select * from table2);

"Mark" <mark.harris.spam.begone_at_ukonline.co.uk.spam.begone> wrote in message news:<3e2c2cf6$0$2577$afc38c87_at_news.easynet.co.uk>...
> Hello,
>
> I'm trying to write some code to select the MIN value from a column which
> exists separately in 2 tables. The table structure is the same but the data
> is different.
>
> E.g. table 1:
>
> ID Name
> ---- ----
> 10 Smith
> 11 Jones
>
> table 2:
>
> ID Name
> ---- ----
> 1 Bloggs
> 12 Chang
>
> I need to identify that the MIN value of ID is 1.
>
> Any suggestions as how to do this?
>
> Thanks,
>
> Mark
Received on Mon Jan 20 2003 - 21:09:54 CST

Original text of this message

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