From: Jason Earl <jdearl@yahoo.com>
To: wweng@pobox.com
To: pgsql-sql@postgresql.org
Subject: Re: Sorting and then...
Date: Tue, 10 Apr 2001 10:32:13 -0700 (PDT)
Message-ID: <20010410173213.72791.qmail@web10006.mail.yahoo.com> (raw)
In-Reply-To: <9atfv4$gb0$1@news.tht.net>
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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: jdearl@yahoo.com, wweng@pobox.com
Subject: Re: Sorting and then...
In-Reply-To: <20010410173213.72791.qmail@web10006.mail.yahoo.com>
References: <9atfv4$gb0$1@news.tht.net> <20010410173213.72791.qmail@web10006.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox