select id from table order by id desc limit 5000

Adam

On Mon, Mar 14, 2011 at 1:52 PM, Ian Hardingham <i...@omroth.com> wrote:

> Hey guys.
>
> I have a table with an autoincrement primary ID, and as part of a select
> I would like to only take the 5000 "largest"/most recent ids.  Is there
> a quick way of doing this without having to get the max first?
>
> Thanks,
> Ian
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
VerifEye Technologies Inc.
905-948-0015x245
151 Whitehall Dr, Unit 2
Markham ON, L3R 9T1
Canada
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to