Hi Holger, hi list,
 
this isn't the solution, because first the records are selected und
afterwards they get ordererd and not the way around. Your solution would
pick the first 10 records with descending order.
 
Any other ideas?

>>> "Becker, Holger" <[EMAIL PROTECTED]> 03/01 17:55 >>>

Steffen Lindauer wrote:

> i'm searching for a solution, getting the last 10 records of a
> database. I've got a table with timestamps and corresponding values.
>  
> SELECT ts,value FROM table WHERE rowno <= COUNT(*)-10''; doesn't
work,
> can sb help me plz?

You could use 
select ts,value from table order by ts desc
and fetch only the first n rows.

Regards,
Holger

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:   
http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to