Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Select Last X rows

From: Borokov Smith <borokov(at)gmail.com>
Date: Sat Jun 30 2007 - 09:06:12 EDT


Rich schreef:
> Hi folks.
>
> Just wanting to know the best way to grab the last 10 rows from a
> table. Looking twice to the db to see how many records there are will
> be outdated by the time the SELECT is done, so it's moot. This is a
> fast moving db with records coming and going.
>
> Instead of having an offset in LIMIT, is there a way to ask for the
> last 10 rows directly?
>
> Cheers
>
>
> Rich in Toronto
>
>
>

Hey,

Why is ORDER BY in combination with LIMIT not a valid solution to your problem ?

Greetz,

boro

-- 
MySQL General Mailing List
For list archives: 
http://lists.mysql.com/mysql
To unsubscribe:    
http://lists.mysql.com/mysql?unsub=lists@pantek.com
Received on Sat Jun 30 09:07:15 2007

This archive was generated by hypermail 2.1.8 : Sat Jun 30 2007 - 09:10:03 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library