List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:June 25 2002 6:43pm
Subject:Re: Need last 100 records...
View as plain text  
In the last episode (Jun 25), Mark S Lowe said:
> Is there a nifty way to select just that last 100 records with MySQL? In
> Oracle I use Maxrows and date to accomplish this. Can?t seem to figure this
> out with MySQL. 

You mean "select the 100 most-recently-inserted records" ?

SELECT * FROM table ORDER BY timestampfield DESC LIMIT 100;

	Dan Nelson
Need last 100 records...Mark S Lowe25 Jun
  • Re: Need last 100 records...Van25 Jun
  • Re: Need last 100 records...Chuck \"PUP\" Payne25 Jun
  • Re: Need last 100 records...Patrick25 Jun
  • Re: Need last 100 records...Dan Nelson25 Jun
  • Re: Need last 100 records...Gerald Clark25 Jun
  • Re: Need last 100 records...Roger Baklund25 Jun
  • Re: Need last 100 records...Van25 Jun
re: Need last 100 records...Richard Morton25 Jun