Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Retrieving first occurrence - How?
Thanks! That looks promising. It works in all of the tests I've run. Can anyone verify that max(rowid) will always return the last record entered for multiple entries in a table?
In article <966436810.9910.0.nnrp-13.9e9809ca_at_news.demon.co.uk>,
"Richard Armstrong" <richard.armstrong_at_juno.demon.co.uk> wrote:
> Could you use the rowid? This could allow you to select a single
record but
> I'm not certain whether max(rowid) would always necessarily
correspond to
> the most recently added record.
>
> Regards,
>
> Richard
>
> GF <GAYLEN.FRALEY_at_MAIL.SPRINT.COM> wrote in message
> news:8ne5b4$mim$1_at_nnrp1.deja.com...
> > Assume that table A has multiple records for a given id. Is there a
> > way to select only one (or the first) occurrence of each id?
There is
> > no other field to group by/having. I just always want the last
record
> > that was added. There is no timestamp field.
> >
> > Thanks!
> >
> > gaylen.fraley_at_mail.sprint.com
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Aug 16 2000 - 11:29:26 CDT