On 31 Aug 2011, at 8:38am, Tobias Vesterlund wrote: > Is it possible to get the highest value in a "limited column" when using > LIMIT?
Sort by that value. For instance, SELECT id FROM t ORDER BY id DESC LIMIT 1 will give you the biggest value of 'id' that can be found. It's not needed in this case, but if you sort using a different field, make sure there's an index which allows quick sorting on that field. It doesn't matter whether the index specifies that field as ASC or DESC. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

