[Monetdb-developers] Does monetdb support limit x,y syntax?
To get a median I want to use this: select myIntCol from mytable order by myIntCol limit half_table_size,1; This works in mySQL. However I get an error when I use limit with x,y params. If I just use limit x then it limits the return results to just x rows. But what I need to do is tell it to start with row x and only give me 1 row (i.e. "... limit 5000, 1;" when I have 10000 rows in the table. Does MonetDB support this format? If not is there a work around?? Thanks.
On 15-06-2008 18:23:05 -0700, Rt Ibmer wrote:
To get a median I want to use this: select myIntCol from mytable order by myIntCol limit half_table_size,1;
This works in mySQL. However I get an error when I use limit with x,y params. If I just use limit x then it limits the return results to just x rows. But what I need to do is tell it to start with row x and only give me 1 row (i.e. "... limit 5000, 1;" when I have 10000 rows in the table.
Does MonetDB support this format? If not is there a work around??
I think you're looking for "OFFSET 5000 LIMIT 1"
participants (2)
-
Fabian Groffen
-
Rt Ibmer