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: How to find last record in a table?

Re: How to find last record in a table?

From: Ana C. Dent <anacedent_at_hotmail.com>
Date: Wed, 14 Jan 2004 17:35:29 -0800
Message-ID: <C7mNb.1648$AA6.1474@fed1read03>


B. Jones wrote:
> Hey, gang.
> I've been relying on a simple little statement that I THOUGHT would
> show me the last record in a table. I found out today that it's
> unreliable (returned records that were inserted on December 12 when
> there were records from today).
> Here's my statement...
> select * from <table> where rowid = (select max(rowid) from <table>);
>
> What do you guys do to find the last record in a table?

Longest/Biggest?
Shortest/smallest?
Oldest?
Newest?
Wavelength?
Ph value?
?????????

"Last" based upon which metric?
How will YOU know for certain it is really the last record? Received on Wed Jan 14 2004 - 19:35:29 CST

Original text of this message

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