Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Need SELECT tips
>
[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