Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> selecting last inserted record in table

selecting last inserted record in table

From: <faheemrao_at_my-deja.com>
Date: Thu, 07 Dec 2000 23:37:53 GMT
Message-ID: <90p70h$a5t$1@nnrp1.deja.com>

I want to select the last inserted record in a table.

I know that there is something to be do with the rownum but when I try this quer logically it seems to be ok , but it is select zero rows,

select * from table_name where rownum in (select max(rownum) from gg)

to me that the subquery return the rownum 1 and that is why actuall query goiving no result , I want a solution in one quer if posssible if not I can go for stored procedure.

thanks

Faheem Rao

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Dec 07 2000 - 17:37:53 CST

Original text of this message

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