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

Home -> Community -> Usenet -> c.d.o.server -> Re: Need SELECT tips

Re: Need SELECT tips

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 04 Feb 2000 11:16:00 -0500
Message-ID: <tnul9scr2svpvv4b0efogjivci6m6sm5qn@4ax.com>


>

[snip]

>
>Hello,
>If I have a table : TEMP
>COL1 CHAR(1) primary key
>COL2 CHAR(1)
>
>col1 col2
>---------------
> A 1
> B 1
> C 2
> D 2
> E 3
> F 3
>
>How could I select the result?
>
>col1 col2
>---------------
> A 1
> C 2
> E 3
>
>Thank you for any tips.

select min(col1), col2 from T group by col2;

>
>Violin.
>violin.hsiao_at_mail.pouchen.com.tw
>

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Feb 04 2000 - 10:16:00 CST

Original text of this message

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