From: Roberto Mello <rmello@cc.usu.edu>
To: wweng@pobox.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Sorting and then...
Date: Mon, 9 Apr 2001 20:40:57 -0600
Message-ID: <20010409204057.A3626@cc.usu.edu> (raw)
In-Reply-To: <9atfv4$gb0$1@news.tht.net>
References: <9atfv4$gb0$1@news.tht.net>
On Mon, Apr 09, 2001 at 07:22:52PM -0400, Wei Weng wrote:
> And I want to get the names of the largest 10 "id"s. How can I do that in
> sql?
What do you mean by "largest"? Largest id? "largest" text string? If
it's the id you can do:
select max(id) from <table>;
-Roberto
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.nethttp://www.sdl.usu.edu - Space Dynamics Lab, Developer
Backup is for whimps!
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: rmello@cc.usu.edu, wweng@pobox.com
Subject: Re: Sorting and then...
In-Reply-To: <20010409204057.A3626@cc.usu.edu>
References: <9atfv4$gb0$1@news.tht.net> <20010409204057.A3626@cc.usu.edu>
* 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