List:MaxDB« Previous MessageNext Message »
From:Dusan Kolesar Date:February 2 2004 11:52am
Subject:Re: Order by and RowNo
View as plain text  
Thank you for advice Rick.
Your query works, but I expect something more common.
I cannot use this query when I want to get not only one line in the result 
but first 10 lines.
Even though, thank you.

Dusan


On Fri, 30 Jan 2004 16:28:28 +0100, Rick F. van der Lans <rick@stripped> 
wrote:

> Hi Dusan,
>
> Will this work for you:
>
> SELECT * FROM table
> WHERE <primary-key-column> = (select max(<primary-key-column>) from 
> table)
>
> If you use min, you will get the row with the lowest value.
>
> best regards,
> Rick van der Lans

-- 
Dusan Kolesar
Helsinska 19
040 13  Kosice
Slovakia
e-mail : dusankolesar@stripped
ICQ# : 160507424

Thread
Order by and RowNoRick F. van der Lans30 Jan
  • Re: Order by and RowNoDusan Kolesar2 Feb