SELECT name FROM test ORDER BY id DESC LIMIT 10;
Take care,
Jason
--- Wei Weng <wweng@kencast.com> wrote:
> Suppose I have a table
>
> create table test
> (
> id integer,
> name text
> );
>
> And I want to get the names of the largest 10 "id"s.
> How can I do that in
> sql?
>
> Thanks!
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
> (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/