Chris Sansom schrieb:
At 10:41 +0200 15/9/06, Dominik Klein wrote:
I have a table with primary key "id". Another field is "date". Now I want the last n entries, sorted by "date".

Is this possible in one SQL statement?

ORDER BY `date` DESC LIMIT n


Last n entries means I want the last (highest) n ids. And that result sorted by date.

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

Reply via email to