Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: selecting last inserted record in table
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