Re: Conditional on Select List

From: "Douglas McNaught" <doug(at)mcnaught(dot)org>
To: Fernando <fernando(at)ggtours(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Conditional on Select List
Date: 2008-05-13 16:09:30
Message-ID: 5ded07e00805130909g40dc6f7v2c8f1d22e461eb8c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, May 13, 2008 at 11:52 AM, Fernando <fernando(at)ggtours(dot)ca> wrote:
>
> Is it possible to do this?
>
> SELECT IF(COUNT(colname) > 0, TRUE, FALSE) AS colname FROM table;

You should be able to use CASE for this.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma 2008-05-13 16:10:17 Re: Conditional on Select List
Previous Message Kevin Hunter 2008-05-13 16:09:28 Re: PG -v- MySQL