Received: from web10006.mail.yahoo.com (web10006.mail.yahoo.com [216.136.130.42]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3AHg4837107 for ; Tue, 10 Apr 2001 13:42:04 -0400 (EDT) (envelope-from jdearl@yahoo.com) Message-ID: <20010410173213.72791.qmail@web10006.mail.yahoo.com> Received: from [12.18.144.101] by web10006.mail.yahoo.com; Tue, 10 Apr 2001 10:32:13 PDT Date: Tue, 10 Apr 2001 10:32:13 -0700 (PDT) From: Jason Earl Subject: Re: Sorting and then... To: wweng@pobox.com, pgsql-sql@postgresql.org In-Reply-To: <9atfv4$gb0$1@news.tht.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200104/138 X-Sequence-Number: 2485 SELECT name FROM test ORDER BY id DESC LIMIT 10; Take care, Jason --- Wei Weng 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/