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 -> Re: selecting last inserted record in table

Re: selecting last inserted record in table

From: <faheemrao_at_my-deja.com>
Date: Fri, 08 Dec 2000 00:29:08 GMT
Message-ID: <90pa0d$cip$1@nnrp1.deja.com>

I have the problem of my problem

This query would solve the purpose

select column_name ,rowid from table_name where rowid in( select max(rowid) from table_name)

Thanks to me :))

In article <90p70h$a5t$1_at_nnrp1.deja.com>,   faheemrao_at_my-deja.com wrote:
>
>
> 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.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Dec 07 2000 - 18:29:08 CST

Original text of this message

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