Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: newbie SQL question
Walter T Rejuney wrote:
>
> > Halim Setiyawan wrote:
> >
> > Can anyone tell me a sql command in Oracle 8i that selects/updates
> > only the first entry if there are multiple entries to be return?
> >
> > Any help will be appreciated.
> >
> > Halim.
>
> Ever heard of writing a program? You can't do what you want with just a
> single select statement most likely but it would be a breeze to handle
> in a pl/sql,pro-c or VB program.
Use ROWID in your query.
eg.
select a.name
from table a
where a.rowid = (select max(b.rowid)
from table b where a.name = b.name)Received on Wed Jun 07 2000 - 00:00:00 CDT
![]() |
![]() |