Re: Select + min question

From: Devrim GUNDUZ <devrim(at)oper(dot)metu(dot)edu(dot)tr>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Select + min question
Date: 2002-06-24 06:18:00
Message-ID: Pine.LNX.4.44.0206240917140.17268-100000@oper.metu.edu.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi,

On Sun, 23 Jun 2002, Christopher Kings-Lynne wrote:
>
> Use a subselect (and don't compare to 't' if it's a boolean field...)
>
> SELECT b_date FROM test WHERE active AND id=(SELECT min(id) FROM test) LIMIT
> 1;

It'a a shame for me that I could not think of using subselects :-(

Anyway, thanks.

Best regards.

--

Devrim GUNDUZ

devrim(at)oper(dot)metu(dot)edu(dot)tr
devrim(dot)gunduz(at)linux(dot)org(dot)tr

Web : http://devrim.oper.metu.edu.tr
-------------------------------------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Denis 2002-06-24 08:28:05 Re: slow DELETE queries
Previous Message Mathieu Arnold 2002-06-23 12:22:17 Re: Select + min question