| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Karl Pielorz | Date: | August 23 2004 12:34pm |
| Subject: | Re: How to get the last record from the slected record set | ||
| View as plain text | |||
--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
| Thread | ||
|---|---|---|
| • How to get the last record from the slected record set | Manisha Sathe | 23 Aug |
| • Re: How to get the last record from the slected record set | Karl Pielorz | 23 Aug |
| • Re: How to get the last record from the slected record set | Martijn Tonies | 23 Aug |
| • Re: How to get the last record from the slected record set | Manisha Sathe | 23 Aug |
| • Re: How to get the last record from the slected record set | Roger Baklund | 23 Aug |
| • Re: How to get the last record from the slected record set | Karl Pielorz | 23 Aug |
| • Re: How to get the last record from the slected record set | Manisha Sathe | 23 Aug |
| • RE: How to get the last record from the slected record set | Kerry Frater | 23 Aug |
| • Re: How to get the last record from the slected record set | gerald_clark | 23 Aug |
| • Re: How to get the last record from the slected record set - Thanks | Manisha Sathe | 23 Aug |
