Hi,
It is a not a clean job but how about having a view like this :

create view foo_view as select * from yourtable order by oid desc limit 2 ;

and then making your select like this:
select * from foo_view order by oid limit 1;

hope that helps
Omid

>From: Bhuvan A <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [SQL] Getting 'n-1'th record.
>Date: Tue, 21 Aug 2001 13:11:33 +0530 (IST)
>
>
>hi all,
>
>consider below..
>
>An sql query results with 'n' records. OK.
>I need ONLY the 'n-1'th record.
>
>
>HOW CAN I GET THIS?
>
>Thankx in advance!
>
>      
>======================================================================
>       Q:      What's the difference between the 1950's and the 1980's?
>      A:       In the 80's, a man walks into a drugstore and states loudly, "I'd
>         like some condoms," and then, leaning over the counter, whispers,
>                            "and some cigarettes."
>
>      
>======================================================================
>
>Regards,
>Bhuvaneswar.
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to