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

How to find last record in a table?

From: B. Jones <seismo_at_elvis.com>
Date: 14 Jan 2004 11:03:37 -0800
Message-ID: <e6ca440a.0401141103.1a52fb5c@posting.google.com>


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?

Thanks. Received on Wed Jan 14 2004 - 13:03:37 CST

Original text of this message

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