Re: Oracle explicit index

From: Toine Tuerlings <su007675_at_wolmail.nl>
Date: Sat, 16 Sep 2000 19:08:36 +0200
Message-ID: <8q0972$nao$1_at_nereid.worldonline.nl>


You can write a procedure or function that opens a cursor ordered by descending timestamp, fetches one row and closes the cursor.

NiallP <niallp_at_my-deja.com> schreef in berichtnieuws 8pqns6$q50$1_at_nnrp1.deja.com...
> In Oracle, is there a way to access a single row based on a specific
> index. Here's an example:
> I have a table with a unique index made up from two columns, user_id,
> time_stamp. There may be thousands of rows for a each user_id. I want
> to access the most recent row for a particular user_id without having
> to read thousands of rows and finding the max time_stamp. How can this
> be accomplished in Oracle?
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Sep 16 2000 - 19:08:36 CEST

Original text of this message