If you don't order your data but specified a LIMIT clause, what are
the records returned ?

24 Aug 2005 17:26:27 +0200, Harald Fuchs <[EMAIL PROTECTED]>:
> In article <[EMAIL PROTECTED]>,
> "Praveen KS" <[EMAIL PROTECTED]> writes:
> 
> > Can anyone help with a query to retrieve latest N records.
> > No auto_increment field.
> > No date field.
> > Primary key exists and is populated with random unique values.
> 
> This means that the only possible definition for "latest" is "highest slno".
> Translated to SQL:
> 
> SELECT slno, name
> FROM tbl
> ORDER BY slno DESC
> LIMIT <N>
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 


-- 
Pooly
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to