Ivan Shmakov <i...@gray.siamics.net> wrote:
>>>>>> Tobias Vesterlund writes:
>> Is it possible to get the highest value in a "limited column" when
>> using LIMIT?
> 
> Sure.
> 
> SELECT max (id) FROM (SELECT id FROM t WHERE id > 0 LIMIT 10);

This only works by accident. There's no requirement that the subselect return 
rows in any particular order. It can, in principle, choose any ten rows.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to