List:General Discussion« Previous MessageNext Message »
From:Manisha Sathe Date:August 22 2004 1:05pm
Subject:Re: How to get the last record from the slected record set
View as plain text  
I want to select first 10 records out of 100. And then get the 10th
position.

If i make use of

order by score asc limit 1

then I will get 100th record, How shall i pick up 10th position?

regards
Manisha


----- Original Message -----
From: "Karl Pielorz" <kpielorz@stripped>
To: "Manisha Sathe" <manisha@stripped>; <mysql@stripped>
Sent: Monday, August 23, 2004 8:34 PM
Subject: Re: How to get the last record from the slected record set


>
>
> --On 22 August 2004 20:31 +0800 Manisha Sathe <manisha@stripped>
> wrote:
>
> > I am having more than 10 records in a table. I want to select only first
> > top 10 records (depending on one field score) and then want to select
> > 10th position record.
> >
> > select * from table1 order by score desc LIMIT 10
> >
> > This will give me 10 records but then how to get the last record ?
>
> order by score asc limit 1
>
> [i.e. turn it around and pick the 1st (which will be the last because it's
> ordered the other way)]
>
> :-)
>
> -Kp
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/mysql?unsub=1
>

Thread
How to get the last record from the slected record setManisha Sathe23 Aug
  • Re: How to get the last record from the slected record setKarl Pielorz23 Aug
  • Re: How to get the last record from the slected record setMartijn Tonies23 Aug
  • Re: How to get the last record from the slected record setManisha Sathe23 Aug
    • Re: How to get the last record from the slected record setRoger Baklund23 Aug
    • Re: How to get the last record from the slected record setKarl Pielorz23 Aug
  • Re: How to get the last record from the slected record setManisha Sathe23 Aug
    • RE: How to get the last record from the slected record setKerry Frater23 Aug
  • Re: How to get the last record from the slected record setgerald_clark23 Aug
  • Re: How to get the last record from the slected record set - ThanksManisha Sathe23 Aug