Re: Sorting and then...

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: wweng(at)pobox(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Sorting and then...
Date: 2001-04-10 02:40:57
Message-ID: 20010409204057.A3626@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
Backup is for whimps!

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2001-04-10 03:00:57 Re: Inheritance Semantics
Previous Message Mark Butler 2001-04-10 01:59:56 Inheritance Semantics